Skip to content

v1.6.0-alpha.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@markerikson markerikson released this 04 Apr 02:13

This initial pre-1.6 alpha release reworks our build tooling to enable upcoming changes, updates dependencies, adds new entity adapter CRUD methods, and tweaks async thunk options.

We have several major improvements planned for later pre-1.6 alphas, including merging the "RTK Query" APIs back into RTK itself and making those available as subpackages.

Changelog

Build Tooling Updates

We've replaced our existing TSDX build setup with a new custom setup based on ESBuild + TypeScript (thanks to @hardfist for doing all the work on that!). In theory, we should have all of the same build artifacts we had before, targeting the same browser and ES spec levels. We did add a new set of "modern" build artifacts that target ES2017, with builds for bundlers and browwsers. However, we can't officially list those in package.json yet, as apparently defining an exports key can break Node and is considered a breaking change. We'll look at flipping that on in a future 2.0 release.

Please let us know if you see any bugs that may be related to the build tooling and bundling changes!

Dependency Updates

We've updated Immer to 9.0.x. Also, we've updated Redux to the hot-off-the-presses 4.1.0-alpha.0, which shrinks bundle size by extracted error messages in production. Again, please report any problems you run into.

New Entity Adapter Replace Methods

createEntityAdapter already had methods to add, upsert, and update items. We've added setOne and setMany, which let you add or entirely replace existing items.

Async Thunk Improvements

createAsyncThunk promises now have a .unwrap() method that returns a promise for the actual result payload, or throws an error if the promise was rejected. This simplifies the use case of working with the thunk result in components.

createAsyncThunk also now accepts an idGenerator option to let you swap out the default nanoid() ID generation utility for your own, such as uuid4.

Other Updates

We've done a bit of internal cleanup in a few functions to simplify and shorten implementations.

configureStore now checks for accidentally returning undefined for a middleware array, or undefined entries in the array.

The PreloadedState type should now work better with TS 4.3+.

Changes

v1.5.1...v1.6.0-alpha.0