Guides
Feature flags
Switch functionality on and off remotely.
Using a flag
const enabled = unit.flag("new_checkout")
return enabled ? <NewCheckout /> : <Checkout />Flags are read synchronously from the in-memory copy, so they are safe to call during render. They are loaded when the SDK starts and refreshed in the background.
Behaviour
- Flags are boolean in the MVP.
- An unknown flag returns
false. - Flags are per environment. Enabling one in staging does not touch production.
What is coming
Percentage rollouts, user targeting, app-version targeting and scheduled activation.