Skip to content
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

Unexpected behavior of buffer with nested dispatches #13

Open
DimaSerhin opened this issue Jun 14, 2017 · 0 comments
Open

Unexpected behavior of buffer with nested dispatches #13

DimaSerhin opened this issue Jun 14, 2017 · 0 comments

Comments

@DimaSerhin
Copy link

DimaSerhin commented Jun 14, 2017

Hi. I've noticed that some of the actions are fired before releasing the queue in 1.0.1.

It happens here when the result of next is calculated.

  active = false
  var result = next(action)

The action is going deep to original dispatch and is dispatched but not returned.
After that, all Redux listeners are called, in my particular case they are callbacks from React-Redux.
Listeners cause some of my components to update and dispatch new actions.
These new actions are handled before the queue release because flag active has been already set to false.

What I expect in this case is that these actions should be pushed to the queue and released with it even if they came after breaking condition, am I right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant