Redux Promise Middleware Versions Save

Enables simple, yet robust handling of async action creators in Redux

6.2.0

4 months ago

This release adds support for Redux 5.0.0 (#292). Thanks @elamperti!

6.1.3

1 year ago

Fixes

  • #290: promiseTypeDelimiter: "" is ignored and instead uses default delimiter

6.1.2

4 years ago

Fixes

  • #256: Removes the version 6.0.0 warning from production builds

6.1.1

4 years ago

Fixes

  • #251: URL to documentation incorrectly linked in the source code.

6.1.0

5 years ago

Fixes

  • #241: ActionType enum was declared as an interface and incorrectly named ActionTypes, not ActionType.

6.0.1

5 years ago

Fixes

  • #237: TypeScript definitions not published to npm

6.0.0

5 years ago

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)

5.1.1

6 years ago

This release adds Typescript bindings, thanks to @franklixuefei!

5.1.0

6 years ago

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!

5.0.0

6 years ago

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.