Couillard
Couillard is a small trebuchet you aim and launch at your users. It's a lean A/B testing tool to validate hypotheses and determine what to build.
More About Lean A/B Testing
Install
yarn add couillard
Usage
const saveMetrics = metrics =>
fetch('...', {
method: 'POST',
body: JSON.stringify(metrics)
})
const WelcomeA = props => (
<p>
Welcome I'm experiment A, {props.name},
<button onClick={hit('welcome', saveMetrics)}>Click Me</button>
</p>
)
const WelcomeB = props => (
<p>
Welcome I'm experiment B, {props.name},
<button onClick={hit('welcome', saveMetrics)}>Click Me</button>
</p>
)
const Welcome = aim('welcome', 50, saveMetrics, {
A: WelcomeA,
B: WelcomeB
})
const Home = () => {
launch('welcome', saveMetrics)
return (
<div class={style.home}>
<h1>Home</h1>
<Welcome name="Jannette" />
</div>
)
}
export Home