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
I got the following error in my webapp: Uncaught Error: Invariant Violation: Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.
While debugging this I noticed that a render, triggered by a store change, is still within a dispatch. Is this as it should work? The problem here is that when rendering nested AltContainers and fetching data in the compomentWillMount hooks with an action this will cause: Uncaught Error: Invariant Violation: Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.
I changed altSetState to use a nextTick. But I'm not sure if that is the way to go. But it does fix the error.
For now I will defer my actions called in all compomentWillMount hooks within an AltContainer.
Does this make sense?
The text was updated successfully, but these errors were encountered:
Klaasvaak
changed the title
Store change is still inside a dispatch
Store change (container render) is still inside a dispatch
May 13, 2016
I got the following error in my webapp:
Uncaught Error: Invariant Violation: Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.
While debugging this I noticed that a render, triggered by a store change, is still within a dispatch. Is this as it should work? The problem here is that when rendering nested AltContainers and fetching data in the compomentWillMount hooks with an action this will cause:
Uncaught Error: Invariant Violation: Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.
I changed altSetState to use a nextTick. But I'm not sure if that is the way to go. But it does fix the error.
For now I will defer my actions called in all compomentWillMount hooks within an AltContainer.
Does this make sense?
The text was updated successfully, but these errors were encountered: