Closed mtermoul closed 8 years ago
Have you tried to do a batched dispatch?
reactor.batch(function () {
reactor.dispatch('ACTION1');
reactor.dispatch('ACTION2');
reactor.dispatch('ACTION3');
});
This will ensure that all listeners will be notified once, after the last dispatch has ended.
Raul.
Yes, I tired that. I was also to call one action from another using jquery promises. So as long as the dispatch is wrapped in a promise or setTimeout then you're cool.
I have the following senario:
onApplicationOpen ---> dispatch('ACTION1') ---> dispatch('ACTION2') ---> dispatch('ACTION3')
so ideally this should work, but somehow the state updates inside the ACTION3 does not update the status!
am I missing something here?