mapActionToState method
This function should be invoked whenever action dispatchd to the store.
Example
Stream<CounterModel> mapActionToState(
CounterModel state, Action action, Store store) async* {
switch (action.type) {
case ActionTypes.Inc:
yield increment(state, action);
break;
default: yield getState(store);
}
}
Implementation
Stream<T> mapActionToState(T state, Action action, Store store);