0.1.0 • Published 7 years ago

ab-positive v0.1.0

Weekly downloads
19
License
GPL
Repository
github
Last release
7 years ago

status npm donwloads issues license

AB+

A lightweight, flexible A/B testing component for React.

The goal of this project is to provide an approachable, functional split testing setup for React apps with minimal implementation overhead. AB+ exposes key callbacks for handling experiments and reporting on variants, which can be used for things like transmitting analytics events and performing further rendering operations.

AB+ uses localStorage to keep track of rendered variants so that a user will continue to see the same variant once it has been chosen.

Please note: this project is a work-in-progress. Feedback & contribution is greatly welcomed!

Installation

Via NPM
npm install --save ab-positive

Usage

Basic example usage
import React from 'react';
import { BannerA, BannerB } from '../components';
import { Experiment, Variant } from 'ab-positive';

...

<Experiment name="homepage_banner" />
  <Variant name="plain" component={BannerA} />
  <Variant name="bold" component={BannerB} />
</Experiment>

Experiment

An experiment manages a set of variants and dictates which variant is ultimately rendered.

You can use as many variants within an experiment as desired.

prop (*required)typedescription
name*Stringa name for the experiment being run

Variant

A variant provides a wrapped instance of your component which allows for props to be injected.

prop (*required)typedescription
name*Stringa name for the variant
component*React componentthe component to load within the variant

Testing

npm test

Troubleshooting

WIP

License

MIT [LICENSE.md]

Contributors

  • Adam Sidiali [Gh] [Tw]
0.1.0

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago