For the complete documentation index, see llms.txt. Prefer markdown by appending.mdto documentation URLs or sendingAccept: text/markdown.
Overview
Ship feature flags in Expo with OpenFeature. Local in-memory defaults, PostHog or GrowthBook for remote rollouts, and targeting from the signed-in user.
Feature flags let you change mobile behavior without waiting on an App Store or Play Store release. Gate unfinished screens, run cohort rollouts, or tune copy from a dashboard while the binary stays the same.
TurboStarter uses OpenFeature so evaluation stays provider-agnostic. Swap between the built-in in-memory provider, PostHog, or GrowthBook without rewriting your screens.
Out of the box starter kit provides you with:
- Shared flag keys in
@workspace/flags(Flag.DEMOships as a working example) - Platform package
@workspace/flags-mobilewith React hooks for Expo - A
FlagsProviderthat syncs targeting context from the signed-in user (targetingKey,email,name) - In-memory provider as the default (no account required for local development)
- Optional PostHog and GrowthBook providers, swapped by changing provider exports
The demo flag is already evaluated on Dashboard → Settings. With the default in-memory config it shows a banner that links back here, so you can verify evaluation before connecting a remote provider.
Client-only on mobile
Unlike the web kit, mobile evaluates flags on the client. There is no @workspace/flags-mobile/server export. Prefer hooks such as useBooleanFlagValue in your screens.
Architecture
Flags live next to analytics in the monorepo:
App wiring sits in apps/mobile/src/lib/providers/flags.tsx and mounts with your root providers. When a session appears, context is set; on logout it is cleared. The PostHog strategy also reloads flags after identify so targeting updates quickly on device.
Providers
TurboStarter includes native support for multiple feature flag providers and offers a unified API for flag evaluation. This approach allows you to monitor feature usage and user behavior consistently throughout your mobile app.
For details on configuring each provider, refer to their sections below:
In-memory
Local defaults, zero config. Great for development.
PostHog
Flags next to analytics and monitoring.
GrowthBook
Dedicated experimentation and targeting.
Configuration and setup are seamlessly integrated with a unified API, so you can switch providers just by changing the exports. You can also add custom providers without affecting any flags-related logic.
In the following sections, you'll learn how to set up each provider and how to evaluate flags in your application.
How is this guide?
Last updated on