Skip to content

Instantly share code, notes, and snippets.

@adeelibr
Created April 24, 2023 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adeelibr/73a7f40b9dcdc707f740b957f89d8f3f to your computer and use it in GitHub Desktop.
Save adeelibr/73a7f40b9dcdc707f740b957f89d8f3f to your computer and use it in GitHub Desktop.
Proposal for feature flags
// BE does the feature flags for users for A/B testing
<FeatureFlag isEnabled={flagValue}>
// Content for a specific feature flag
</FeatureFlag>
const FeatureFlag = ({ isEnabled, children }) => {
return isEnabled ? children : null;
}
// Can be used for feature flags for A/B testing
// Can be used for feature flags on vercel .env till a fully feature is developed while we deploying on main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment