mapActionToState method
This method should be invoked by sysytem passing current state and action. You should mutate the state based on action
Example
Stream<CounterModel> mapActionToState(
CounterModel state, Action action ) async* {
switch (action.type) {
case ActionTypes.Inc:
yield increment(state, action);
break;
default: yield state;
}
}
Implementation
Stream<T> mapActionToState(T state, Action action);