CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 186
Releases: pburtchaell/redux-promise-middleware
Version 6.2.0
bf88fee
Compare
This release adds support for Redux 5.0.0 (#292). Thanks @elamperti!
Assets 2
Version 6.1.3
Compare
Fixes
- #290: promiseTypeDelimiter: "" is ignored and instead uses default delimiter
Assets 2
Version 6.1.2
Version 6.1.1
Compare
Fixes
- #251: URL to documentation incorrectly linked in the source code.
Assets 2
Version 6.1.0
Version 6.0.1
Version 6.0.0
612043c
Compare
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)
Assets 2
Version 5.1.1
a5b052a
Compare
This release adds Typescript bindings, thanks to @franklixuefei!
Assets 2
Version 5.1.0
cfc6300
Compare
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!
Assets 2
Version 5.0.0
Compare
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.