5.0.0
版本发布时间: 2017-11-20 00:26:05
pburtchaell/redux-promise-middleware最新发布版本:6.2.0(2023-12-28 03:07:18)
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.