redux-sloth-kit
Dear sloth, this is a Redux and TypeScript friendly tool.
Motivation
Reducing Redux boilerplate.
We sometimes feel not good.
- encode action, dispatch, handle and decode action
- many times nested assignments for immutable update
- type annotations that seem obvious to me
Redux is a great tool, but we can feel troublesome because of so simple.
redux-sloth-kit
was created to reduce the problem.
Install
$ npm install redux-sloth-kit
$ yarn add redux-sloth-kit
Usage
;; ;; // combine modules into one; // use module as a just reducer; // dispatch action like function callstore.dispatchactionCreators.addTodo"Example 2"; // actionCreators is well-type-defined so below code causes error// store.dispatch(actionCreators.addTodo(3));
For more detail, see <./example/> directory.