Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.firstflow.app/llms.txt

Use this file to discover all available pages before exploring further.

Installation

npm install @firstflow/react-native
npm install @react-native-async-storage/async-storage
cd ios && pod install  # iOS only
Requirements: React Native 0.70+

Exports

@firstflow/react-native re-exports everything from @firstflow/react and adds mobile-specific utilities.

From @firstflow/react-native

ExportDescription
FirstflowProviderSame as @firstflow/react.
FirstflowWidgetSame as @firstflow/react. Renders using React Native primitives.
SurveySame as @firstflow/react.
useFirstflow()Same as @firstflow/react.
useFirstflowSurvey()Same as @firstflow/react.
useKeyboardHeight()Returns the current software keyboard height in pixels.

Platform adapters

The SDK automatically uses native implementations for all platform capabilities. No manual configuration required.
CapabilityImplementation
Frequency tracking@react-native-async-storage/async-storage
Device detectionreact-native’s Platform and Dimensions
Theme preferencereact-native’s Appearance API
Link openingreact-native’s Linking.openURL
HTTP transportfetch

React reference pages

All shared components and hooks are documented in the React reference:

FirstflowProvider

FirstflowWidget

useFirstflow()

Survey

useFirstflowSurvey()


Troubleshooting

AsyncStorage peer dependency warning
npm install @react-native-async-storage/async-storage
cd ios && pod install
Metro can’t resolve @firstflow/react-native Add to metro.config.js:
const path = require("path");

config.resolver.extraNodeModules = {
  "@firstflow/react-native": path.resolve(
    __dirname,
    "node_modules/@firstflow/react-native"
  ),
};
Experiences not rendering on iOS Run pod install after installing AsyncStorage. A missing native module causes the storage adapter to silently fall back to in-memory state, which means frequency records are lost on restart and experiences may show again unexpectedly.