We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3146b35 commit b92a139Copy full SHA for b92a139
src/hooks/useSelector.js
@@ -64,15 +64,15 @@ function useSelectorWithStoreAndSubscription(
64
useIsomorphicLayoutEffect(() => {
65
function checkForUpdates() {
66
try {
67
- const storeState = store.getState()
68
- const newSelectedState = latestSelector.current(storeState)
+ const newStoreState = store.getState()
+ const newSelectedState = latestSelector.current(newStoreState)
69
70
if (equalityFn(newSelectedState, latestSelectedState.current)) {
71
return
72
}
73
74
latestSelectedState.current = newSelectedState
75
- latestStoreState.current = storeState
+ latestStoreState.current = newStoreState
76
} catch (err) {
77
// we ignore all errors here, since when the component
78
// is re-rendered, the selectors are called again, and
0 commit comments