Created
August 9, 2023 20:22
-
-
Save juliandavidmr/55fc7eed6107f06a0e12b683aeffefb2 to your computer and use it in GitHub Desktop.
2022 Demo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// <Demo> must be enclosed in <ExperimentLayout>. | |
// | |
// Example: | |
// <ExperimentLayout> | |
// <Demo /> | |
// </ExperimentLayout> | |
const Demo = () => { | |
const { isControlActive } = useExperiment(); | |
const variantId = 'test_demo_experiment'; // TODO: update with real experiment flag key. | |
const abIsControl = isControlActive(variantId); | |
return abIsControl ? <h1>Control enabled</h1> : <h2>Variant enabled</h2> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment