Skip to content

Unable to use resultEqualityCheck with weakMapMemoize #679

Closed

Description

@psychedelicious

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

Activity

  1. aryaemami59 commented on Jan 5, 2024

    @aryaemami59
    Member

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

  2. EskiMojo14 commented on Jan 5, 2024

    @EskiMojo14
    Contributor

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

  3. EskiMojo14 commented on Jan 5, 2024

    @EskiMojo14
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions