redux-delayed
Redux middleware for accepting actions with delayed dispatch
Usage
; // Here our middleware'sconst middlewares = ... delayedMiddleware ...; const enhancer = // And creating storeconst store = ;
Types of actions
Default action (as object)
{ return type: TEST_ACTION payload ;};
Action as function:
{ ... return { };};
Action as Promise:
{ return { ... // Should be resolved/rejected with FSA };};
Combined action with promise and types:
{ return types: TEST_ACTION // dispatched on call TEST_ACTION_ON_RESOLVE // dispatched if promise resolved TEST_ACTION_ON_REJECT // if rejected source ;};
Contributing
If something is unclear, confusing, or needs to be refactored, please let me know. Will appreciate any help :3