You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose I have a thunk created with createAsyncThunk, and due to various implementation constraints, that thunk must dispatch multiple actions during execution.
In order to reduce the number of re-renders, I can use react-redux's batch() API to dispatch all intermediate actions in a single render update. However, once the thunk returns, it will also dispatch a .fulfilled action, which will trigger another render.
Is there a way to include the .fulfilled action in the same batch() as the intermediate actions such that the entire async thunk will trigger only a single render update?