Releases: pburtchaell/redux-promise-middleware
Version 6.2.0
This release adds support for Redux 5.0.0 (#292). Thanks @elamperti!
Version 6.1.3
Fixes
- #290: promiseTypeDelimiter: "" is ignored and instead uses default delimiter
Version 6.1.2
Fixes
- #256: Removes the version 6.0.0 warning from production builds
Version 6.1.1
Fixes
- #251: URL to documentation incorrectly linked in the source code.
Version 6.1.0
Fixes
- #241:
ActionType
enum was declared as an interface and incorrectly namedActionTypes
, notActionType
.
Version 6.0.1
Fixes
- #237: TypeScript definitions not published to npm
Version 6.0.0
Breaking Changes
Previously, the middleware need to be instantiated with an optional configuration.
import promiseMiddleware from 'redux-promise-middleware'
applyMiddleware(
promiseMiddleware({
// Optional configuration
}),
)(createStore)
This implementation enabled custom configuration, but, for most implementations, it is uncessary overhead.
Now, the default export is preconfigured and ready to go.
import promise from 'redux-promise-middleware'
applyMiddleware(
promise,
)(createStore)
We still support custom configuration. Check the upgrading guide for more help.
Thanks to @rahulbdominic and @zhanyuzhang for assisting on this release.
New
- Updated TypeScript definitions with more robust types to use for async action creators (#234)
Version 5.1.1
This release adds Typescript bindings, thanks to @franklixuefei!
Version 5.1.0
This release adds peer dependency support for Redux 4. This is backwards compatible release, meaning there are no API changes. Should you experience any bugs, please file an issue and we'll get to it!
Version 5.0.0
Breaking Changes 🔥 🚒
The promiseTypeSeparator
config property is now promiseTypeDelimiter
.
Why? Because delimiters are one or more characters used to specify the boundaries in strings. It’s a delimiter, not a separator!
applyMiddleware(
promiseMiddleware({
promiseTypeDelimiter: '/'
})
)
With the above configuration, given FOO
async action, the type will be appended with a forward slash /
delimiter.
{
type: 'FOO/PENDING'
}
New ✨
- Async functions—using async/wait—are supported. Thanks to @mikew for the PR!
- Development dependencies and example project dependencies are upgraded.
- The middleware code comments were extended to provide a clearer picture of how it works.
Here’s an async/await example:
{
type: 'TYPE',
async payload () {
const fooData = await getFooData();
const barData = await getBarData(fooData);
return barData;
}
}
See the Async/Await guide for more.