redux-land
intuitive middleware for redux.
Install
yarn add redux-land
or
npm install --save redux-land
Features
- dispatch multiple actions with async-generator-functions
- type safe (with typescript. you can see example)
Usage
;; // action types const INC = "INC";const ASYNCINC = "ASYNCINC"; // reducerconst reducer = { } { return ;} const asyncInc = { await ; type: INC; // this action will be dispatched. await ; type: INC;// you can dispatch action, any number of times} const landMiddleware = ; const store = ; // laterstore;
Usage (TypeScript)
types.ts
; ; ;;;; ; ;
module.ts
;;;; ; ; ; ; ;
index.ts
;; store.dispatch;
Dependency Injection
module.ts
...
__tests__/module.spec.ts
... ;; ...
For unit test
... ;;expectvalue.toEqual;...
License
MIT