reduxjs / reselect

Selector library for Redux
MIT License
19.04k stars 670 forks source link

Incorrect weakMapMemoize alternative example using useCallback #682

Closed benax-se closed 9 months ago

benax-se commented 9 months ago

The example of avoiding redundant selector calls by using useCallback on the weakMapMemoize page is non-working We still have the same instance of selector, so the cache will share to all the component instances using the same selector

https://codesandbox.io/p/sandbox/reselect-usecallback-demo-y8wldt

EskiMojo14 commented 9 months ago

yep, agreed - a PR to remove the example (or replace it with a version that works) would be welcome :)