We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f013206 commit cb43c4fCopy full SHA for cb43c4f
packages/use-sync-external-store/src/useSyncExternalStoreExtra.js
@@ -76,6 +76,7 @@ export function useSyncExternalStoreExtra<Snapshot, Selection>(
76
}
77
78
// The snapshot has changed, so we need to compute a new selection.
79
+ memoizedSnapshot = nextSnapshot;
80
const nextSelection = selector(nextSnapshot);
81
82
// If a custom isEqual function is provided, use that to check if the data
@@ -86,7 +87,6 @@ export function useSyncExternalStoreExtra<Snapshot, Selection>(
86
87
return prevSelection;
88
89
- memoizedSnapshot = nextSnapshot;
90
memoizedSelection = nextSelection;
91
return nextSelection;
92
};
0 commit comments