A/B testing React components and debug tools. Isomorphic with a simple, universal interface. Well documented and lightweight. Tested in popular browsers and Node.js. Includes helpers for Mixpanel and Segment.com.
Cookies added as a storage option. A new storeCookie.jsx was added that contains a funtion with get and set cookies functions. A new emitter flag (enableCookies) and its setter and getter were added to keep in track user preferences.
Changes were tested in two projects. One vanilla React with almost nothing on it except google analytics, and in one bigger unreleased project with many different cookies. All of my tests were completed successfully, including "yarn test" as described.
Also, messing with the values from cookies and local storage while enabling and disabling cookies storage seems to work nice and smooth (All variations showed up as expected).
Screenshots (if appropriate):
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have added tests to cover my changes.
[x] All new and existing tests passed.
New emitter function "setCookie" needs to be mentions to the documentation as well. By setting emmiter.setCookie(true) the module uses cookies as storage. Default option is local storage.
Table of Contents
Description
Cookies added as a storage option. A new storeCookie.jsx was added that contains a funtion with get and set cookies functions. A new emitter flag (enableCookies) and its setter and getter were added to keep in track user preferences.
Motivation and Context
This feature was requested here https://github.com/marvelapp/react-ab-test/issues/21 .
How Has This Been Tested?
Changes were tested in two projects. One vanilla React with almost nothing on it except google analytics, and in one bigger unreleased project with many different cookies. All of my tests were completed successfully, including "yarn test" as described. Also, messing with the values from cookies and local storage while enabling and disabling cookies storage seems to work nice and smooth (All variations showed up as expected).
Screenshots (if appropriate):
Types of changes
Checklist:
New emitter function "setCookie" needs to be mentions to the documentation as well. By setting emmiter.setCookie(true) the module uses cookies as storage. Default option is local storage.
Whatever you may need, please let me know.