redux
5.0.1 · 23 Dec 2023MIT62.6M / weekRepositoryHomepagenpmAtom feed
Upgrading redux From 2.0.0 to 5.0.1
40 releases in betweenevery note read
Reading releases, release notes and advisories…
- 17
- changes to make
- 0
- advisories fixed
- 15
- new
- 15
- fixes
Start here
Before you upgrade
Tick each one off as you go- breaking5.0.0
- breaking5.0.0
- breaking5.0.0
- breaking5.0.0
- breaking4.0.0
- breaking3.0.6
- breaking3.0.0
- deprecated5.0.0
- deprecated5.0.0
- deprecated5.0.0
Release by release
- fixed
isPlainObject: Support check Object.create(null)
- fixed
types/store: Unexpectedly narrowed return type of function
Store['getState']
- fixed
- breaking
Removes the
PreloadedStatetype in favor of a new generic argument for theReducertype. - breaking
This release has breaking changes.
- breaking
For full details on all of the breaking changes and other significant changes to all of those packages, see the "Migrating to RTK 2.0 and Redux 5.0" migration guide in the Redux docs.
- breaking
Strictly speaking, this is not a breaking change, nor is it new in 5.0, but we're documenting it here for completeness.
- breaking
4.2.1nothing new or fixed in the note
- deprecated
This release marks the original
createStoreAPI as@deprecatedto encourage users to migrate to Redux Toolkit, and adds a newlegacy_createStoreAPI as an alias without the deprecation warning. - deprecated
We already had a package rename from
redux-starter-kitto@reduxjs/toolkit, and all of our docs and tutorials have pointed to it for the last three years. I don't want to put users through another whiplash package transition for no real benefit - deprecated
Merging or rearranging our packages would effectively require merging all of the Redux repos into a single monorepo. That would require hundreds of hours of effort from us maintainers, including needing to somehow merge all of our docs sites together. We don't have the time to do that.
- deprecated
Mark
createStoreas deprecated, and addlegacy_createStorealias
- deprecated
- fixed
Fix preloaded state type
- fixed
4.1.1nothing new or fixed in the note
- new
Mangle error codes to error indexes (#3920 - @andrewmcgivery)
- fixed
Declare "EmptyObject" interface to wrap $CombinedState (#4031 - @JacobLey)
- new
- fixed
Fix for combineReducers when replaceReducers removes a reducer
- fixed
78 other lines we could not sort, mostly version bumps
- 5.0.0
Converts the codebase to TypeScript
- 5.0.0
Updates the packaging for better ESM/CJS compatibility and modernizes the build output
- 5.0.0
Requires that
action.typemust be a string - 5.0.0
nextwould be typed to have all of the dispatch extensions, including the ones earlier in the chain that would no longer apply. - 5.0.0
actionis not necessarily a known action, it can be literally anything - for example a thunk would be a function with no.typeproperty (soAnyActionwould be inaccurate) - 5.0.0
The
Reducer,ReducersMapObject, andcreateStore/configureStoretypes/function take an additionalPreloadedStategeneric which defaults toS. - 5.0.0
The overloads for
combineReducersare removed in favor of a single function definition that takes theReducersMapObjectas its generic parameter. Removing the overloads was necessary with these changes, since sometimes it was choosing the wrong overload. - 5.0.0
Enhancers that explicitly list the generics for the reducer will need to add the third generic.
- 4.2.1
Remove minified check
- 4.2.0
RTK provides a vastly improved Redux usage experience, with APIs that simplify standard usage patterns and eliminate common bugs like accidental mutations
4 internal lines (docs, tests, tooling) left out.