Skip to Content
Getting StartedFirst Feature Flag

First Feature Flag

Ship a feature flag in under 5 minutes. This guide assumes you’ve completed the Quickstart and have @appdispatch/react-native installed.

1. Create a flag in the dashboard

Open Flags in the sidebar and click Create flag.

  • Name: New Checkout
  • Key: new-checkout
  • Type: Boolean
  • Default value: false

Click create, then toggle the flag on for your production channel.

2. Use the flag

import { useBooleanFlagValue } from '@appdispatch/react-native' function CheckoutButton() { const newCheckout = useBooleanFlagValue('new-checkout', false) if (newCheckout) { return <NewCheckoutFlow /> } return <LegacyCheckout /> }

No additional setup needed — the SDK was already initialized in your root layout during the Quickstart.

3. Toggle it

Go back to the dashboard, toggle the flag off. Reload your app — the old checkout appears.

Toggle it on — the new checkout appears. No deploy needed.

Next steps

Last updated on