1 comment

[ 0.72 ms ] story [ 10.5 ms ] thread
I am _thrilled_ to announce that:

Redux Toolkit 2.0 is LIVE!!!

- https://github.com/reduxjs/redux-toolkit/releases/tag/v2.0.0

This major version has new features, faster perf, smaller bundle size, and removes deprecated options.

It's accompanied by majors for all our Redux family packages

## RTK 2.0:

- a new `combineSlices` method for lazy-loading reducers - Updates to `createSlice` to include a `selectors` field and allow defining thunks inside

- Immer 10 w/ faster updates

- Removal of deprecated options

See the migration guide:

- https://redux.js.org/usage/migrations/migrating-rtk-2

All of the Redux libraries now have modernized packaging with full ESM/CJS compat. They also ship modern JS (no transpiling for IE11), which means smaller bundle sizes.

We've also done byte-shaving work to shrink the bundles (extracting error messages, de-duping imports)

## Redux core 5.0:

- The TS conversion we did in 2019!

- Action types _must_ be strings

- `UnknownAction` as the default action type

- Better preloaded state types

- Internal subscription improvements

- Still marks `createStore` as deprecated!

- https://github.com/reduxjs/redux/releases/tag/v5.0.0

## React-Redux 9.0:

- *Now requires React 18 and RTK 2.0 / Redux 5.0* - Updates dev-mode checks - Throws better errors in an RSC environment

- https://github.com/reduxjs/react-redux/releases/tag/v9.0.0

## Reselect 5.0:

- Switches to a new `weakMapMemoize` memoizer as default

- Renames `defaultMemoize` to `lruMemoize`

- Allows passing memoizer options direct to `createSelector`

- Many TS improvements

- https://github.com/reduxjs/reselect/releases/tag/v5.0.1

## Redux Thunk 3.0:

- Drops the default export and switches to named exports ( `{thunk, withExtraArgument}` )

- https://github.com/reduxjs/redux-thunk/releases/tag/v3.1.0

This has been a _huge_ year-long development effort!

We're thrilled to get these improvements out. The tooling and bundle improvements will help all users, and we think the features and TS changes will improve the Redux dev experience significantly.

Thank you SO MUCH to everyone who has contributed or helped test out the work!

Please file bug reports for the inevitable issues that pop up post-release!

but now I'm going off on a conf trip and going to take a very well-earned break from Redux work for December :)