reduce method
This method should be invoked by sysytem passing current state and action. You should mutate the state based on action
Example
CounterModel reduce(CounterModel state, Action action) {
switch (action.type) {
case ActionTypes.Inc: return increment(state, action);
default: return state;
}
}
Implementation
T reduce(T state, Action action);