redux-promise-middleware
Advanced tools
Comparing version
@@ -149,4 +149,9 @@ 'use strict'; | ||
dispatch(rejectedAction); | ||
reject({ reason: reason, action: rejectedAction }); | ||
var error = new Error(); | ||
error.reason = reason; | ||
error.action = rejectedAction; | ||
reject(error); | ||
return; | ||
@@ -153,0 +158,0 @@ }); |
{ | ||
"name": "redux-promise-middleware", | ||
"version": "3.0.2", | ||
"version": "3.1.0", | ||
"description": "Redux middleware for handling promises and optimistic updates", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
# Redux Promise Middleware | ||
[](https://www.npmjs.com/package/redux-promise-middleware) [](https://travis-ci.org/pburtchaell/redux-promise-middleware) [](https://coveralls.io/github/pburtchaell/redux-promise-middleware?branch=master) [](https://www.npmjs.com/package/redux-promise-middleware) | ||
[](https://www.npmjs.com/package/redux-promise-middleware) [](https://travis-ci.org/pburtchaell/redux-promise-middleware) [](https://coveralls.io/github/pburtchaell/redux-promise-middleware?branch=master) [](https://www.npmjs.com/package/redux-promise-middleware) [](https://snyk.io/test/npm/redux-promise-middleware) | ||
Redux promise middleware enables robust handling of async code in [Redux](http://redux.js.org). The middleware enables optimistic updates and dispatches pending, fulfilled and rejected actions. It can be combined with [redux-thunk](https://github.com/gaearon/redux-thunk) to chain async actions. | ||
@@ -6,0 +7,0 @@ |
261942
0.08%5683
0.05%23
4.55%