For the complete documentation index, see llms.txt. Prefer markdown by appending .md to documentation URLs or sending Accept: 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.DEMO ships as a working example)
  • Platform package @workspace/flags-mobile with React hooks for Expo
  • A FlagsProvider that 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:

keys.ts - Flag key constants
in-memory.ts - Default local definitions
react.tsx - createFlagsReact + hooks
index.tsx - FlagsProvider, setContext, clearContext

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:

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

On this page

Ship your startup everywhere. In minutes.Try TurboStarter