Skip to content

Latest commit

 

History

History
68 lines (46 loc) · 2.61 KB

README.md

File metadata and controls

68 lines (46 loc) · 2.61 KB

redux-fluent

Build Status npm version License Conventional Commits

npm downloads Maintainability Test Coverage

....................:::::::::::::::::::....................

....................:::::::::::::::::::....................


Installation

yarn add redux-fluent redux flux-standard-action

Documentation

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

Stats

Discussion

License

MIT