-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dispatching actions in callbackFunction #8
Comments
Hi @itsdorosh, |
Sure.
I understand, that update the same place in store can make recursive call of the callback function, but even if I update another part of store, callback is looped. |
Hi @itsdorosh, so I investigated the issue and turned out there's a bug indeed. I'm gonna fix it asap, but can't promise anything really soon. |
Hi @itsdorosh, I dived deeper into the problem and that's what I found/realized:
So, basically the issue you described for
To summarize, |
Indeed, I experienced the same issue, and also ended up using a conditional statement, and also dispatched the action in a setTimeout to ensure store is updated before my side-effect action is dispatched. |
Hi @ivantsov ) Your lib is very helpful in projects, thank you.
Recently I encountered such a phenomenon that when any action is activated inside the callback function, the callback function is called again and again.
The Redux website says that their subscription function allows the dispatch of actions inside the callback function.
What if I need to make a dispatch inside the callback function? Is this possible?
Thank you)
The text was updated successfully, but these errors were encountered: