> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getflowpilot.io/llms.txt
> Use this file to discover all available pages before exploring further.

# FlowPilot Expo SDK

> A React Native (Expo) SDK that resolves and renders FlowPilot flows natively in your app.

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](/ios-sdk/index). 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](/expo-sdk/caching) and [Offline and bundled flows](/expo-sdk/offline-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](/expo-sdk/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.

<Warning>
  `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.
</Warning>

<Info>
  **Before you start**

  You need:

  * A FlowPilot [workspace](/dashboard/workspaces-and-apps).
  * An [app](/dashboard/workspaces-and-apps) inside that workspace.
  * An [SDK API key](/dashboard/api-keys) for that app.
</Info>

## 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

<CardGroup cols={3}>
  <Card title="Installation" icon="download" href="/expo-sdk/installation">
    Add the package and its peer dependencies to your Expo app.
  </Card>

  <Card title="Configuration" icon="gear" href="/expo-sdk/configuration">
    Initialize the SDK at launch with your API key and App ID.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/expo-sdk/quickstart">
    Configure, present a placement, and read the result.
  </Card>
</CardGroup>

## Related pages

* [Installation](/expo-sdk/installation)
* [Configuration](/expo-sdk/configuration)
* [Expo quickstart](/expo-sdk/quickstart)
* [How FlowPilot works](/get-started/how-it-works)
* [Core concepts](/get-started/core-concepts)
* [iOS SDK overview](/ios-sdk/index)
