@launchdarkly/session-replay-react-native
v0.5.1
Published
session replay for react native
Downloads
899
Readme
session-replay-react-native
session replay for react native
Installation
npm install session-replay-react-nativeUsage
Use the session replay plugin with the LaunchDarkly React Native client:
import { ReactNativeLDClient, AutoEnvAttributes } from '@launchdarkly/react-native-client-sdk';
import { createSessionReplayPlugin } from 'session-replay-react-native';
const plugin = createSessionReplayPlugin({
isEnabled: true,
maskTextInputs: true,
maskWebViews: true,
maskLabels: true,
maskImages: true,
});
const client = new ReactNativeLDClient(
'YOUR_LAUNCHDARKLY_MOBILE_KEY',
AutoEnvAttributes.Enabled,
{ plugins: [plugin] }
);Or use the imperative API:
import {
configureSessionReplay,
startSessionReplay,
stopSessionReplay,
} from 'session-replay-react-native';
await configureSessionReplay('YOUR_LAUNCHDARKLY_MOBILE_KEY', { isEnabled: true });
await startSessionReplay();
// later: await stopSessionReplay();Contributing
License
MIT
Made with create-react-native-library
