iam4x / isomorphic-flux-boilerplate

ES7 Isomorphic Flux/ReactJS Boilerplate
http://isomorphic.iam4x.fr
794 stars 121 forks source link

Unhandled promise rejection Error... #159

Closed SPAHI4 closed 8 years ago

SPAHI4 commented 8 years ago

I have ItemsStore connected with Header and Items components. When url is /items and i trying to change something in ItemsStore all works fine. But if i do changes when im on the main page / i got this error

Unhandled promise rejection Error: Invariant Violation: Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.(…)
iam4x commented 8 years ago

Hello @SPAHI4,

This means you may have two actions firing a state change at the same time, or a page transition when a state change occur. You can use flux.getActions('xxxx').actionName.defer(); to defer actions when you have this kind of concurrency.

You should find more information about that into reactiflux discord altjs channel.

SPAHI4 commented 8 years ago

Thanks It was problem with setting title