react-redux icon indicating copy to clipboard operation
react-redux copied to clipboard

Check why we no longer bail out of subscription checks when `store.getState()` hasn't changed

Open markerikson opened this issue 2 years ago • 1 comments

In v7, we definitely bailed out of useSelector if the store state hadn't changed:

https://github.com/reduxjs/react-redux/blob/49f768082e5c56930e943a3a9b0a60249bce1914/src/hooks/useSelector.js#L67-L71

Per https://github.com/reduxjs/redux/pull/4627 , there's questions of whether it still does that correctly in v8 with useSyncExternalStore. Should look into this.

(also, there's a question of whether we should bail out inside subscriber callbacks, or before calling them)

markerikson avatar Dec 01 '23 19:12 markerikson

Hey @markerikson, I fixed it in react.

gentlee avatar Dec 02 '23 01:12 gentlee