A redux lib for Reactant
npm install reactant-redux
# or
yarn add reactant-redux
import { redux } from 'reactant-redux';
const counter = redux({
reducers: {
count: (state = 0, { type, payload }) =>
type === 'increase' ? state + payload : state,
},
actions: {
increase: num => dispatch =>
dispatch({
type: 'increase',
payload: num,
}),
},
});
You can visit reactant.js.org for more documentation.