```tsx React theme={null}
export const SampleComponent = () => {
const isEnabledNewLabel = process.env.FEATURE_NEW_LABEL === 'true';
return (
{isEnabledNewLabel && NEW}
Sample
);
};
```
```ruby Ruby theme={null}
def new_label_enabled?
ENV['FEATURE_NEW_LABEL'] == 'true'
end
def sample_labels
labels = []
labels << 'NEW' if new_label_enabled?
labels << 'Sample'
labels.join(' ')
end
```
Enabling the feature in the production environment is a configuration change — add `FEATURE_NEW_LABEL=true` to the environment — and disabling it is removing that line.
The flag turns "the code is in the production environment" and "the feature is visible" into independent facts. That unlocks: