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.
Requirements
| SDK | Requirements |
|---|---|
@firstflow/react | React 18+, TypeScript 5+ (optional but recommended) |
@firstflow/nextjs | Next.js 14+ (App Router), React 18+ |
@firstflow/react-native | React Native 0.70+, React 18+ |
React
Next.js
@firstflow/react and adds server utilities (getFirstflowConfig) for SSR config prefetching.
React Native
AsyncStorage is required for frequency tracking on mobile. Without it, frequency limits fall back to in-memory state (reset on app restart).
Environment variables
| Environment | Default URL |
|---|---|
Development (localhost) | http://localhost:3002 |
| Production | https://api.firstflow.app |
TypeScript
The SDK ships its own type definitions. No@types/* packages required.
If you encounter type errors after installation, add to tsconfig.json:
Bundler compatibility
The SDK uses theexports field in package.json. Supported bundlers:
- Vite 3+
- Webpack 5+
- Rollup 3+
- Metro 0.60+ (React Native)
- Turbopack (Next.js 13.5+)
Verify
Troubleshooting installation
"Module not found" error
"Module not found" error
Your bundler may not resolve the
exports field. Ensure you’re on Webpack 5, Vite 3+, or Metro 0.60+. For older setups, use the CommonJS build: import { FirstflowProvider } from "@firstflow/react/cjs".TypeScript errors about missing types
TypeScript errors about missing types
Set
skipLibCheck: true in tsconfig.json. Ensure @types/react is installed.Metro can't resolve @firstflow/react-native
Metro can't resolve @firstflow/react-native
Add to
metro.config.js: