npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@launchdarkly/session-replay-react-native

v0.11.1

Published

session replay for react native

Readme

session-replay-react-native

session replay for react native

Installation

npm install session-replay-react-native

Usage

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();

Masking sensitive content

How the SDK decides what to mask

For each view, the SDK evaluates these rules in order and stops at the first that applies:

  1. Explicit masking (highest priority): is this view — or any of its ancestors — explicitly masked (wrapped in <LDMask>, or testID matched by maskTestIDs)?
    • Yes: the view is masked. This overrides everything below.
  2. Explicit unmasking: is this view — or any of its ancestors — explicitly unmasked (wrapped in <LDUnmask>, or testID matched by unmaskTestIDs)?
    • Yes: the view is unmasked.
  3. Global configuration: does the global privacy config (maskTextInputs, maskLabels, maskImages, maskWebViews) apply to this view?
    • Yes: the view follows the global config.

When two rules conflict at the same level, masking wins over unmasking.

Global toggles by component type

Set on the plugin config; each affects every instance of that RN component across the app.

createSessionReplayPlugin({
  maskTextInputs: true, // default — masks every <TextInput>
  maskLabels: false, // when true, masks every <Text>
  maskImages: false, // when true, masks every <Image>
  maskWebViews: false, // when true, masks every <WebView>
});

By testID

Name specific views to mask or unmask. Match is exact string equality — 'password' matches <View testID="password" /> but not <View testID="password_field" />.

createSessionReplayPlugin({
  maskTestIDs: ['password', 'ssn'],
  unmaskTestIDs: ['greeting'],
});

Wrapper components

Redact a subtree without giving it a testID.

import { LDMask, LDUnmask } from '@launchdarkly/session-replay-react-native';

<LDMask>
  <Text>account balance: $1,234</Text>
</LDMask>;

<LDUnmask>
  <Text>safe even when maskLabels is on</Text>
</LDUnmask>;

<LDMask> propagates to descendants and beats any <LDUnmask> further down the tree — once a subtree is wrapped in <LDMask>, nothing inside it can opt back in.

Contributing

License

MIT


Made with create-react-native-library