Open
Description
What version of React, ReactDOM/React Native, Redux, and React Redux are you using?
- React: 18.0.0
- ReactDOM:18.0.0
- Redux Toolkit:1.8.1
- React Redux:8.0.1
What is the current behavior?
Synchronous calls to dispatch and setState within useEffect will cause separate re-rendering.
Since it may not be possible to check visually, try using the Profiler in the React Developer Tools to see how it works.
https://codesandbox.io/s/brave-dew-cc7p4p?file=/src/features/counter/CounterEditor.tsx
What is the expected behavior?
The re-rendering occurs only once.
Which browser and OS are affected by this issue?
Chrome/100.0.4896.127, Windows10
Did this work in previous versions of React Redux?
- Yes