redux-promise-middleware
Advanced tools
Comparing version 2.3.1 to 2.3.2
{ | ||
"name": "redux-promise-middleware", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"description": "Redux middleware for handling promises", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -38,3 +38,3 @@ # Redux Promise Middleware | ||
The middleware returns a [FSA compliant](https://github.com/acdlite/flux-standard-action) action for both rejected and resolved/fulfilled promises. In the case of a rejected promise, an `error` is returned. | ||
The middleware returns a [FSA compliant](https://github.com/acdlite/flux-standard-action) action for both rejected and resolved/fulfilled promises. In the case of a rejected promise, an `error` is returned. You can access the promise of the action with `payload.promise`. This is useful for chaining actions together or using `async...await` within an action creator. | ||
@@ -73,3 +73,3 @@ ## What is the difference between this and other promise middleware? | ||
payload: { | ||
promise: Promise.resolve((dispatch, getState) => { | ||
promise: Promise.resolve((action, dispatch, getState) => { | ||
dispatch({ type: 'SECEOND_ACTION_TYPE', payload: ... }) | ||
@@ -82,2 +82,4 @@ dispatch(someActionCreator()) | ||
Note that this behavior uses thunks, so you will need to include [thunk middleware](https://github.com/gaearon/redux-thunk) in your middleware stack. | ||
## Type suffix configuration | ||
@@ -84,0 +86,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
10735
113
0
6