redux-fluent
v0.100.4
Published
A Practical and Functional utility for redux
Downloads
84
Readme
....................:::::::::::::::::::....................
...::: TRY OUR COUNTER REDUCER EXAMPLE ON CODESANDBOX :::...
....................:::::::::::::::::::....................
Installation
yarn add redux-fluent redux flux-standard-action
Documentation
- https://code-y.github.io/redux-fluent
Getting Started
import { createStore } from 'redux';
import { createAction, createReducer, ofType } from 'redux-fluent';
const increment = createAction('increment');
const decrement = createAction('decrement');
const counter = createReducer('counter')
.actions(
ofType(increment).map(state => state + 1),
ofType(decrement).map(state => state - 1),
)
.default(() => 0);
const store = createStore(counter);
store.dispatch(increment());
Distribution
- https://www.npmjs.com/package/redux-fluent
Stats
3.2 kB
- https://bundlephobia.com/result?p=redux-fluent