Skip to content

Commit

Permalink
chore: adding readme
Browse files Browse the repository at this point in the history
  • Loading branch information
izaaz committed Oct 30, 2024
1 parent 7211492 commit f4144ff
Showing 1 changed file with 42 additions and 9 deletions.
51 changes: 42 additions & 9 deletions packages/plugin-session-replay-react-native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,58 @@ npm install @amplitude/plugin-session-replay-react-native
```

## Usage

Add the session replay plugin to your Amplitude instance as follows

```js
import { multiply } from '@amplitude/plugin-session-replay-react-native';
import { SessionReplayPlugin } from '@amplitude/plugin-session-replay-react-native';

// ...

const result = await multiply(3, 7);
await init('YOUR_API_KEY').promise;
await add(new SessionReplayPlugin()).promise;

```

## Masking views
To maks certain views, add the `AmpMaskView` tag with the mask property `amp-mask` around the section to be masked

## Contributing
```js
import { AmpMaskView } from '@amplitude/plugin-session-replay-react-native';

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
// ...

## License
<AmpMaskView mask="amp-mask">
<Text
style={[
styles.sectionTitle,
{
color: isDarkMode ? Colors.white : Colors.black,
},
]}
>
{title}
</Text>
</AmpMaskView>
```

MIT
## Unmasking views
To unmask views, add the `AmpMaskView` tag with the mask property `amp-unmask` around the section to be unmasked

---
```js
import { AmpMaskView } from '@amplitude/plugin-session-replay-react-native';

// ...

Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
<AmpMaskView mask="amp-unmask">
<Text
style={[
styles.sectionTitle,
{
color: isDarkMode ? Colors.white : Colors.black,
},
]}
>
{title}
</Text>
</AmpMaskView>
```

0 comments on commit f4144ff

Please sign in to comment.