Skip to main content
The FlowPilot React Native SDK (@flowpilotjs/react-native-sdk) turns a placement key into a native flow on screen inside an Expo app. You configure it once at launch, then ask it to present a placement. The SDK resolves which flow to show, renders it as native React Native views, and reports how the user finished. It is the JavaScript / TypeScript counterpart of the iOS Swift SDK. The two SDKs share the same flow JSON schema and aim for pixel-parity, so a flow built once in the dashboard renders the same on both.

What it does

The SDK does three things for every placement you present:
  1. Resolve. It asks the FlowPilot backend which flow (and which experiment variant, if any) to show for this placement, user, and audience. Results are cached, so the next present is fast.
  2. Render. It draws the resolved flow as native React Native components. There is no web view. Components, layout, animations (via react-native-reanimated), and persistent UI zones all render natively.
  3. Report. It emits analytics events automatically (flow_start, screen_view, flow_complete, and more), lets you forward them to your own analytics, and tracks conversions for revenue attribution.
The SDK is built to fail safe. If a resolve fails or times out, it falls back to the last cached flow, then a bundled default you ship in the app, then your own native UI. Adding FlowPilot does not add a way to crash or block your app. See Caching and Offline and bundled flows for the full fallback chain.

How you present a flow

You present a flow declaratively: resolve a FlowSession for the placement, then render it with the <FlowPilotPresenter session={...} /> component. This is the one supported render path on the Expo SDK, and it is covered in Presenting placements:
  • FlowPilot.resolveSession('key') is the non-throwing resolver. It returns a ready session, or null when nothing is presentable so your app can render its own UI. Recommended for must-not-fail entry points like onboarding.
  • FlowPilot.createSession('key') does the same resolution but throws when there is no presentable flow, for when you would rather try/catch than null-check.
FlowPilot.presentPlacement() is deprecated on the Expo SDK and renders nothing (React Native has no global presentation host). Use the declarative pattern above. On the iOS SDK, imperative presentPlacement is supported.
Before you startYou need:

Requirements

Requirements
  • Expo SDK 51+ (managed or bare workflow)
  • React Native 0.74+
  • React 18+
  • TypeScript 5.4+ (optional, but recommended)
The SDK ships no native modules of its own. It is pure JS/TypeScript and relies on a set of Expo peer dependencies (expo-image, expo-font, expo-haptics, expo-linear-gradient, expo-linking, expo-file-system, expo-secure-store, expo-store-review, react-native-reanimated, react-native-safe-area-context, react-native-svg, @react-native-community/slider, lottie-react-native) that you install in your app.

Where to go next

Installation

Add the package and its peer dependencies to your Expo app.

Configuration

Initialize the SDK at launch with your API key and App ID.

Quickstart

Configure, present a placement, and read the result.