Skip to content

Releases: pburtchaell/redux-promise-middleware

Version 6.2.0

27 Dec 19:07
bf88fee
Compare
Choose a tag to compare

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

Version 6.1.3

26 Sep 02:04
Compare
Choose a tag to compare

Fixes

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

Version 6.1.2

05 Nov 17:08
fd4e993
Compare
Choose a tag to compare

Fixes

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

Version 6.1.1

15 Jun 17:03
Compare
Choose a tag to compare

Fixes

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

Version 6.1.0

14 Feb 01:43
9b3c5c0
Compare
Choose a tag to compare

Fixes

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

Version 6.0.1

07 Feb 23:40
50c7a88
Compare
Choose a tag to compare

Fixes

  • #237: TypeScript definitions not published to npm

Version 6.0.0

03 Feb 20:04
612043c
Compare
Choose a tag to 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)

Version 5.1.1

18 Apr 23:12
a5b052a
Compare
Choose a tag to compare

This release adds Typescript bindings, thanks to @franklixuefei!

Version 5.1.0

18 Apr 13:44
cfc6300
Compare
Choose a tag to 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!

Version 5.0.0

19 Nov 16:26
Compare
Choose a tag to 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.