Gates documentation
Gates does not deploy your app. Expo does. Gates controls which users receive which feature after deployment, and does it without ever making your app wait on a network request.
The SDK, @gates/expo, has the shape of React Query: a client, a provider and hooks, plus three components for the common branches. Flags are evaluated on the phone from the last snapshot it saved, so reading one never waits on the network and keeps working offline.
Start here
- Install: add the package and its Expo peers.
- Create your first flag: a project, an environment key and a flag in the dashboard.
- Provider setup: wrap your app once.
- Read a flag:
useFlag, and what it returns before a snapshot exists.
Guarantees
flag()anduseFlag()are synchronous and never throw. They never fetch. They return the fallback until the local snapshot has loaded.- A failed or malformed sync sets
lastErrorand keeps the previous snapshot. - If storage throws, the client keeps its state in memory for the rest of the process.
- Telemetry (exposure and adoption) is batched. Failures are dropped or retried and never affect evaluation.
What Gates does not do
Flags are boolean. There is no statistics engine, no multivariate flag, no native, Flutter or server SDK, and no real-time push: phones pick up changes on their next sync.