Skip to content

Releases: reduxjs/redux-thunk

v2.1.2

18 Jan 08:14
Compare
Choose a tag to compare
  • Reverts v2.1.1, since it seemed to break TS builds under certain circumstances

v2.1.1

18 Jan 06:19
Compare
Choose a tag to compare

This release has been reverted.
Use v2.2.0 instead.

  • Adds TypeScript definitions (#77)

v2.1.0

10 May 15:13
Compare
Choose a tag to compare
  • Adds withExtraArgument for the cases when you want to inject a custom argument into all thunks. (#70)
const store = createStore(
  reducer,
  applyMiddleware(thunk.withExtraArgument(api))
)

// later
function fetchUser(id) {
  return (dispatch, getState, api) => {
    // you can use api here
  }
}

v2.0.1

06 Mar 13:17
Compare
Choose a tag to compare
  • Fixes a botched 2.0.0 release 😅

v2.0.0

06 Mar 13:07
Compare
Choose a tag to compare

Note: this release was botched. Read the notes here but install 2.0.1 (or later) instead 😅 .

Breaking Changes

If you used Redux Thunk from npm in CommonJS environment, you need to add .default to your requires:

- var ReduxThunk = require('redux-thunk')
+ var ReduxThunk = require('redux-thunk').default

If you used ES modules, you’re already all good:

import ReduxThunk from 'redux-thunk' // no changes here 😀

New Features

UMD build

Like with CommonJS build, you will need to grab the middleware from .default export:

var ReduxThunk = window.ReduxThunk.default

Grab the UMD build on npmcdn.

ES modules build

Rollup users can now use redux-thunk directly without commonjs plugin.

v1.0.3

28 Dec 22:31
Compare
Choose a tag to compare

v1.0.2

14 Dec 08:59
Compare
Choose a tag to compare
  • Fixes the unintended regression when using CommonJS build (#41)

v1.0.1

13 Dec 20:21
Compare
Choose a tag to compare
  • Removes .babelrc from the NPM package because it confuses React Native 0.16 (#40)

v1.0.0

17 Sep 17:25
Compare
Choose a tag to compare
  • Nothing changed—just bumping to 1.0 to signal it's stable

v0.1.0

13 Jul 13:34
Compare
Choose a tag to compare
  • Initial release