❗ DEPRECATED ❗ : Superseded by @fdmg/design-system. See: https://github.com/FDMediagroep/fd-design-system
A/B testing component
- https://fdmg-ts-react-ab.fdmediagroep.now.sh/demo
- Debug settings: https://fdmg-ts-react-ab.fdmediagroep.now.sh/demo?debugAB=true
- Run
npm i -D @fdmg/ab
import { Experiment, Variant, ABProvider } from "@fdmg/ab";
...
<ABProvider>
...
<Experiment
name="Globally unique experiment name"
debugUriParam="ABdebug=true"
onClick={console.log}
onRunExperiment={console.log}
>
<Variant name="A" onClick={console.log}>
<h1>Headline 1</h1>
</Variant>
<Variant name="B" onClick={console.log}>
<h1>Headline 2</h1>
</Variant>
</Experiment>
...
</ABProvider>
...
ABProvider component provides a context which manages cookies. The cookies are used to store variants shown to the user so subsequent visits show the same variants for that user.
Thanks goes to these wonderful people (emoji key):
Willem Liu 💻 📖 💡 🚧 |
Willem Liu 💻 📖 💡 🚧 |
Greenkeeper 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!