github reduxjs/reselect v4.1.0-beta.0
4.1.0-beta.0

latest releases: v5.1.0, v5.0.1, v5.0.0...
pre-release2 years ago

This beta release updates defaultMemoize with the ability to clear cache for a memoized function, and updates the TS types of createSelector to correctly infer the type of the function returned from the memoizer.

We would appreciate any feedback on the behavior of the new features and compatibility of the TS types, in preparation for a final 4.1.0 release.

npm i reselect@next

yarn add reselect@next

Changelog

defaultMemoize Cache Clearing

defaultMemoize now supports clearing the cache inside a memoized function. The memoized function returned from defaultMemoize will now have a .clearCache() method attached that will clear the cache.

When using createSelector, this can be accessed using selector.memoizedResultFunc.clearCache().

createSelector TypeScript Return Type Inference Improvements

createSelector should now fully infer the type of the memoized function returned by the memoize parameter. This means that standard use of createSelector, which already has defaultMemoize built in, will also correctly infer the existence of selector.memoizedResultFunc.clearCache().

What's Changed

New Contributors

Full Changelog: v4.1.0-alpha.2...v4.1.0-beta.0

Don't miss a new reselect release

NewReleases is sending notifications on new releases.