I am using Alt library for Flux architecture implementation. I have a component, which displays information about movie. Now I am stuck in a situation where I need to render array of such components under my home page. The problem is that each of these components calls ajax request
inside componentDidMount
. So when I have more then one - I get:
Uncaught Error: Invariant Violation: Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.
I wrote a longer post here, this is a more succinct version. I simply cannot understand the nature of the problem.
EDIT: Clarifying with an image. Basically I get the poster for the first component and on the second it throws an error and stops working: