Skip to content

Commit b92a139

Browse files
committed
Avoid variable naming conflicts
1 parent 3146b35 commit b92a139

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/hooks/useSelector.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ function useSelectorWithStoreAndSubscription(
6464
useIsomorphicLayoutEffect(() => {
6565
function checkForUpdates() {
6666
try {
67-
const storeState = store.getState()
68-
const newSelectedState = latestSelector.current(storeState)
67+
const newStoreState = store.getState()
68+
const newSelectedState = latestSelector.current(newStoreState)
6969

7070
if (equalityFn(newSelectedState, latestSelectedState.current)) {
7171
return
7272
}
7373

7474
latestSelectedState.current = newSelectedState
75-
latestStoreState.current = storeState
75+
latestStoreState.current = newStoreState
7676
} catch (err) {
7777
// we ignore all errors here, since when the component
7878
// is re-rendered, the selectors are called again, and

0 commit comments

Comments
 (0)