
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
react-redux-ab
Advanced tools
A simple A/B testing library for React and Redux that can work in any environment
react-redux-ab is a simple A/B testing library that stores the active variants in a reducer for easy access accross the whole application. It is universal, as it can run on the client side, browser side or any kind of application where redux can run.
Compared to prior libraries (such as , it offers the following advantages:
import { combineReducers } from 'redux'
import { createExperiments } from 'react-redux-ab'
const rootReducer = combineReducers({
/* Your stuff here */
experiments: createExperiment(sb{
'buttons': {
variants: [
{name: 'blue'},
{name: 'red', weight: 5}
]
},
'callToAction': {
variants: [
{name: 'original'},
{name: 'suggestion1'},
{name: 'suggestion2'}
]
}
})
})
import { createStore } from 'redux'
import { digestCookies } from 'react-redux-ab'
import Cookies from 'js-cookie'
import rootReducer from './reducer'
const initalState = {
experiments: digestCookies(Cookies.get())
}
const store = createStore(rootReducer, initialState)
import { backeCookies } from 'react-redux-ab'
import Cookies from 'js-cookie'
store.subscribe(() => {
bakeCookies(store.getState(), Cookies.set)
})
import React from 'react'
import { Experiment, Variant } from 'react-redux-ab'
export default function MyApp (props) {
return <Experiment name="callToAction">
<Variant name="original">
<button>Boring button</button>
</Variant>
<Variant name="suggestion2">
<a href="#">Awesome link</a>
</Variant>
</Experiment>
}
Check out more details on parameters and possibilities in the API docs
FAQs
A simple A/B testing library for React and Redux that can work in any environment
The npm package react-redux-ab receives a total of 0 weekly downloads. As such, react-redux-ab popularity was classified as not popular.
We found that react-redux-ab demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.