Use `useLayoutEffect` rather than `useEffect` to subscribe to store
This fixes a potential issue where the component would not be re-rendered if a store update occurred in between the initial rendering and `useEffect` subsequently firing.
Showing
Please register or sign in to comment