Skip to content

Dispatch multiple actions at once #468

Closed
@ghetolay

Description

@ghetolay

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[X] Feature request
[ ] Documentation issue or request

Add the ability to dispatch multiple actions without emitting a new state for each action but only once all action are processed.

So instead of

store.select(state).subscribe( () => counter++);

store.dispatch( new AddItem(item1) );
store.dispatch( new AddItem(item2) );

//counter == 2

we would get

store.select(state).subscribe( () => counter++);

store.dispatch( [new AddItem(item1), new AddItem(item2)] );

//counter == 1

I've already looked how it could be done, should be easy and I could do it if this is accepted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions