This package has been deprecated

Author message:

Superseded by @fdmg/design-system. See: https://github.com/FDMediagroep/fd-design-system

@fdmg/ab
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Build Status Coverage Status npm version Greenkeeper badge

fdmg-ab

A/B testing component

Demo

Installation

  • Run npm i -D @fdmg/ab

Usage

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.

Readme

Keywords

Package Sidebar

Install

npm i @fdmg/ab

Weekly Downloads

6

Version

1.0.3

License

ISC

Unpacked Size

31.2 kB

Total Files

25

Last publish

Collaborators

  • dirk-straat
  • willem_liu
  • sapulidi