☁️Feature Flag
Also known as Feature Toggle, Feature Switch, Flag
A switch in your code. It turns a feature on or off with no deploy.
Think of it like
Think of it like a light switch on the wall. The wiring is already in, and you choose when to turn it on.
Example
Emma ships a new search page behind a flag. She turns it on for staff only, finds a bug, fixes it, and then turns it on for everyone.
Why it matters
Definition
Example code
javascript
if (flags.isOn('new-search', user)) {
showNewSearch();
} else {
showOldSearch();
}Common mistake
Key takeaways
- 1Ship it off. Turn it on later.
- 2Pick who sees it. Staff, a share, everyone.
- 3Clean up. Remove old flags.