Skip to content

7.0.0

Choose a tag to compare

@davidmarne davidmarne released this 22 Oct 19:06
· 229 commits to master since this release

A breaking change in behavior was made to action dispatchers.

Before action dispatchers executed the middleware/reducers asynchronously, but they now execute synchronously.

For example you may have:

int getCount(store) {
  print(store.state.count); // prints 0
  store.actions.increment(1);
  print(store.state.count); // would print 1 if actions were sync, 0 if async
  return store.state.count; // would return 1 if actions were sync, 0 if async
}

Before this function would return 0 because the state update that occurs from actions.increment would be processed in a future task.
Now this function will return 1 because the state update that occurs from actions.increment is processed in the current task