staydecent / atom

Shared, synchronous, independent state for JavaScript apps.
ISC License
7 stars 1 forks source link

Add batch api to group an array of dispatches #5

Closed staydecent closed 7 years ago

staydecent commented 7 years ago

instead of:

dispatch(anEvent)
dispatch(anotherEvent)

Could batch them:

batch(anEvent, anotherEvent)

And subscribers would only be called after all actions in given to batch have run