/react-redux-optimizely

React Component(s) and helpers for running Optimizely experiments in a React/Redux Application.

Primary LanguageJavaScriptMIT LicenseMIT

react-redux-optimizely

Build Status npm version

React Component(s) and helpers for running Optimizely experiments in a React/Redux Application.

Installation

npm install --save react-redux-optimizely

Connecting an experiment

import React from 'react';
import connect from 'react-redux-optimizely';

let Header = ({ variant, isActive }) => {
    if (variant) {
        return (<h1>Variant</h1>);
    }
    return (<h1>Base</h1>);
};

export default connect('MY_EXP_NAME')(Header);

Configuring Optimizely

// todo

Experiment Conditions

// todo

Activate Experiment on render

// todo

Configure Redux Middleware

// todo

Goal Tracking

// todo