Skip to content

Commit 0768b45

Browse files
committed
read fresh store state on dispatch
1 parent 32481c9 commit 0768b45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hooks/useSelector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function useSelectorWithStoreAndSubscription(
4343
if (!equalityFn(nextSelectedState, state.selectedState)) {
4444
selectedState = nextSelectedState
4545
// schedule another update
46-
dispatch(state.storeState)
46+
dispatch(store.getState())
4747
}
4848
}
4949

0 commit comments

Comments
 (0)