v3.0.0-alpha.1
版本发布时间: 2023-01-21 10:40:15
reduxjs/redux-thunk最新发布版本:v3.1.0(2023-12-04 21:57:13)
This is the initial alpha release for Redux Thunk 3.0. This release has breaking changes.
Changelog
ESM Migration
In conjunction with the Redux Toolkit 2.0 alpha development work, we've migrated the package definition to be a full {type: "module"}
ESM package (with CJS still included for compatibility purposes).
Default Export Converted to Named Exports
As part of that ESM migration, we've dropped the existing default export in favor of named exports. Migration of user code should be straightforward:
// Previously: a default export that has `withExtraArgument` attached
- import thunk from 'redux-thunk'
// Now: separate named exports, no default export
+ import { thunk, withExtraArgument } from 'redux-thunk'
That said, users really should be using configureStore
from Redux Toolkit instead, which already automatically adds the thunk middleware to the Redux store.