Skip to content

Unexpected behavior of buffer with nested dispatches #13

@DimaSerhin

Description

@DimaSerhin

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions