Closed tuwhoo closed 7 years ago
I try to call action in componentDidUpdate, but it falls with error Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.. If I add setTimeout in call of this action - it works correctly. I use alt 0.16.10
componentDidUpdate
Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.
setTimeout
0.16.10
+1
Sorry for disturbing. I found that solution was described before in this issue and looks like
const alt = new Alt({ batchingFunction: ReactDOM.unstable_batchedUpdates });
More info I found here, here and here
I try to call action in
componentDidUpdate
, but it falls with errorDispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.
. If I addsetTimeout
in call of this action - it works correctly. I use alt0.16.10