0.0.15 • Published 3 years ago

couillard v0.0.15

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

npm.io npm.io

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

// Your metrics store, can be Segment, Amplitude, SQL, mongo, or whatever you like.
const saveMetrics = metrics =>
  fetch('...', {
    method: 'POST',
    body: JSON.stringify(metrics)
  })

// Create variation A component.
const WelcomeA = props => (
  <p>
    Welcome I'm experiment A, {props.name},
    <button onClick={hit('welcome', saveMetrics)}>Click Me</button>
  </p>
)

// Create variation B component.
const WelcomeB = props => (
  <p>
    Welcome I'm experiment B, {props.name},
    <button onClick={hit('welcome', saveMetrics)}>Click Me</button>
  </p>
)

// Aim your experiment at your users.
const Welcome = aim('welcome', 50, saveMetrics, {
  A: WelcomeA,
  B: WelcomeB
})

// Only WelcomeA or WelcomeB will render.
const Home = () => {
  launch('welcome', saveMetrics)

  return (
    <div class={style.home}>
      <h1>Home</h1>
      <Welcome name="Jannette" />
    </div>
  )
}

export Home
0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago