Open amsterdamharu opened 4 years ago
If I want to to use dispatch in an effect then dispatch is a dependency and since dispatch changes on every call to useCombinedReducers the effect will be called every time.
A stack overflow issue can be found here.
The pull request is here
This is actually easily solved with the useRef hook. Check the PR for more info, I made a comment there :)
If I want to to use dispatch in an effect then dispatch is a dependency and since dispatch changes on every call to useCombinedReducers the effect will be called every time.
A stack overflow issue can be found here.
The pull request is here