react-contest

0.3.0 • Public • Published

Components

ExperimentProvider - global experiment engine

Control and handle all of your experiments at a high level

Variant - individual a/b testing based on the experiment name you'll figure out if the test should be shown or hidden

Contest

Super tiny A/B testing platform for your own components.

<Experiment
  name="showAdOnDetailPage"
  onSelect={variant => {
    console.log(`${variant.name} viewed`)
  }}
  variants={[
    {
      name: 'a',
      chance: 40,
      component: <A />
    },
    {
      name: 'b',
      chance: 30,
      component: <B />
    },
    {
      name: 'c',
      chance: 30,
      component: <C />
    },
  ]}
/>

Readme

Keywords

Package Sidebar

Install

npm i react-contest

Weekly Downloads

0

Version

0.3.0

License

ISC

Last publish

Collaborators

  • peterpme