Skip to content

Unable to use resultEqualityCheck with weakMapMemoize #679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
psychedelicious opened this issue Jan 5, 2024 · 3 comments
Closed

Unable to use resultEqualityCheck with weakMapMemoize #679

psychedelicious opened this issue Jan 5, 2024 · 3 comments

Comments

@psychedelicious
Copy link

I'm unable to use resultEqualityCheck with weakMapMemoize. Runtime error:

TypeError
lastResult?.deref is not a function
memoized
https://gtqrl5.csb.app/node_modules/reselect/dist/cjs/reselect.cjs:620:43
dependenciesChecker
https://gtqrl5.csb.app/node_modules/reselect/dist/cjs/reselect.cjs:711:39
memoized
https://gtqrl5.csb.app/node_modules/reselect/dist/cjs/reselect.cjs:615:21
memoized
https://gtqrl5.csb.app/node_modules/react-redux/dist/cjs/react-redux.development.cjs:134:28
memoizedSelector
https://gtqrl5.csb.app/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js:110:27
getSnapshotWithSelector
https://gtqrl5.csb.app/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js:133:14
updateSyncExternalStore
https://gtqrl5.csb.app/node_modules/react-dom/cjs/react-dom.development.js:16860:22
Object.useSyncExternalStore
https://gtqrl5.csb.app/node_modules/react-dom/cjs/react-dom.development.js:17943:14
useSyncExternalStore
https://gtqrl5.csb.app/node_modules/react/cjs/react.development.js:1676:21
useSyncExternalStoreWithSelector
https://gtqrl5.csb.app/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js:144:15
useSelector2
https://gtqrl5.csb.app/node_modules/react-redux/dist/cjs/react-redux.development.cjs:188:27
Counter
/src/features/counter/Counter.js:19:28

Minimal repro: https://codesandbox.io/p/sandbox/dazzling-kapitsa-gtqrl5?file=%2Fsrc%2Fapp%2Fstore.js%3A20%2C71

@aryaemami59
Copy link
Member

This was fixed in #671. @EskiMojo14 I believe we have to release a 5.0.2 for that to take effect?

@EskiMojo14
Copy link
Contributor

yep, I'll aim to get a release out today

@EskiMojo14
Copy link
Contributor

Fix published in v5.1.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants