Skip to content
Gates

Kill switches and reach

What disabling does

Disable in the dashboard sets enabled = false and bumps the revision in the same transaction. A disabled flag evaluates to false with reason disabled, whatever its rules say. Phones receive the new state on their next sync; the guarantee is that connected clients converge according to the sync triggers, not “instant”.

A kill switch is project-wide: off means off in development, preview and production.

Reach

A flag only reaches the versions of your app that contain a call to it. A store build from March and an OTA update from this morning can both ship useFlag("payments"); a build from January that predates the code cannot be reached by any dashboard change.

Gates records, from heartbeats and exposure, which store builds and OTA updates have evaluated each flag. The Kill switches screen shows Reaches: the share of active installations in the current environment whose version has evaluated the flag. Open a switch to see which versions ship it. The Releases screen shows the reverse view: every version your devices have run, its store builds, the OTA updates on it, and the flags each one ships.

In code

Use <Switch> (or useFlag(key, true)) around a feature that already ships. Its default is true, so a device that has never synced, or is offline on first launch, keeps the feature up instead of hiding it.

<Switch name="payments" fallback={<PaymentsDown />}>
  <Checkout />
</Switch>

See Flag, Switch and Experiment.