All articles Integration

React Native Session Replay: Masked and Lightweight

Developer holding a glowing phone in a dark studio with translucent UI layers floating above it

Adding session replay to a React Native app is a different problem from adding it to a marketing site. A web page is one document; a mobile screen is a native view tree on iOS or Android, a JavaScript layer driving navigation and state, and a network stack in between. Recording React Native sessions means capturing all three without turning a smooth screen into a slideshow — and without letting a card number, address or one-time code leave the device.

The second difference is exposure. On the web, a mistyped email field is an annoyance. In an app, the same field can hold a phone number, a delivery address or an OTP that a support agent will later replay on a shared screen. Whatever you record has to be masked before it is stored, not after someone notices.

What replay actually captures

Replay is not a video

A replay tool records structured snapshots of the view tree plus the events that change it: navigation, taps, scrolls, input events, failed requests. Because it is structured data rather than pixels, a field can be removed at the source instead of blurred later, payloads stay small, and sessions stay searchable. Masking becomes a data problem, which is the easier version of the problem.

Two layers, one session

A tap on a button is a JavaScript event; the button the user saw is a native view. Native replay ties both together so the timeline shows what was on screen when the tap happened, not just a list of route names.

Masking is the default, not a backlog task

Translucent glass panel with lock shapes masking a phone screen

Mask at capture, and again on the server

Design in three tiers: mask every input by default, allow-list the few non-sensitive strings you need (static labels, screen titles), and never ship an unmask switch — someone will flip it during an incident and forget to flip it back. In Prynt Replay every form field is masked in the client and masked again on the server, and there is no unmask option. The constraint is the feature.

What masking does not cover

Inputs are the easy part. The hard part is user data rendered as plain text: an order number in a heading, an address in a card, a chat message. Treat any string built from user data as sensitive and send it through a masked component. Then write the rule down, because the next developer will not read your replay config.

Keeping overhead low

Record a sample, not everything

You rarely need every session. Sampling a fraction, capping recording length and stopping capture on idle screens keeps CPU cost and payload predictable. Choose the sample rate from the question you are answering, not from the storage you happen to have.

Keep work off the critical path

Batch view mutations and flush on a timer or when the app goes to background, instead of serializing on every keystroke. Record the visible window of a long list, not the whole list. Measure on a low-end Android device, where the cost shows up first.

Measure before and after

Write down cold start time, frame drops on your heaviest screen and bytes uploaded per session before you enable replay, then again after. Without those numbers you cannot defend the feature in a performance review, and you will not catch a regression introduced by an SDK update.

From recording to a fix

Glowing line graph and narrowing data streams above a laptop in a dark room

Attach identity so sessions are findable

A recording nobody can locate is a cost with no return. Attach identity at sign-in with an identify call carrying your user id and account id, so support can open every session of one customer or one company from your own admin rather than hunting by timestamp. With Prynt you pass the user and account, list sessions with your secret key and open them in an embedded player; the setup is in the docs at https://pryntid.com/docs.

Read the patterns replay surfaces fastest

Rage clicks on a disabled button, dead clicks on a label that looks tappable, a JavaScript error that only fires after a failed request, a checkout screen that takes seconds to become interactive: these are the patterns replay surfaces fastest on mobile. Native replay covers iOS, Android, React Native and Flutter, and Py, the Prynt AI, summarises sessions and explains what went wrong, within a monthly limit per plan.

A pre-ship checklist

  • Every input masked by default; no unmask flag in the codebase.
  • User-generated strings routed through a masked component.
  • Sample rate, maximum duration and flush interval agreed with the team.
  • Cold start and frame timing measured before and after.
  • Identity wired so sessions map to a customer and an account.
  • Retention and access policy written before the first recording.

Prynt Replay starts free with 1,000 sessions a month, 14-day retention and one site; Pro is $279/month for 10,000 sessions, 30-day retention and three sites, with a 14-day trial and volume plans up to 1M sessions. Bot sessions do not count against your quota. For how replay sits alongside bot filtering and account decisions, see https://pryntid.com/platform, and the access boundaries behind the masking in https://pryntid.com/security.

FAQ

Support engineer reviewing a floating session timeline in a dark office

Does session replay slow down a React Native app?

It can, if it serializes on every render. Batching mutations, sampling sessions and capping duration keep the cost small — and measurable against the numbers you captured before enabling it.

Are text inputs and one-time codes recorded?

They should not be. With masking applied at capture and again on the server, form fields are removed before storage. Your remaining job is masking user data rendered as plain text, such as order numbers and addresses.

Does the same setup work on iOS and Android?

Native replay covers both platforms from one integration, and the same session list serves support on either. Test on a low-end Android device, where overhead is most visible.

Start with one screen

Pick your worst-performing screen, record a sample of sessions on it, and read ten before rolling out further. Prynt Replay runs on the same platform and the same account as the rest of the suite, so you can start free at https://pryntid.com.

Try it free

Prynt is device intelligence with a free plan: 5,000 identifications a month, visitor IDs with confidence and bot detection — no credit card. Upgrade to Pro for VPN, proxy, tampering and behavioral signals.

Keep reading