@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:- 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.
- 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. - 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.
How you present a flow
There are two presentation paths, both covered in Presenting placements:- Imperative (
FlowPilot.presentPlacement('key')) opens a full-screen modal and resolves a promise with the outcome. Use it when you just need a flow shown. - Declarative (
FlowPilot.createSession('key')plus the<FlowPilotPresenter session={...} />component) gives you control over safe-area handling and lets you embed the flow in your own view tree.
Before you startYou need:
- A FlowPilot workspace.
- An app inside that workspace.
- An SDK API key for that app.
Requirements
Requirements- Expo SDK 51+ (managed or bare workflow)
- React Native 0.74+
- React 18+
- TypeScript 5.4+ (optional, but recommended)
expo-image, expo-font, expo-haptics, 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.