TUSPOHUZQJOH +BWB @Reducer(Counter.class) public class CounterReducer { @Dispatchable(IncrementCountAction.class) public Counter increment(Counter state) { return new Counter(state.getCount() + 1); } @Dispatchable(DecrementCountAction.class) public Counter decrement(Counter state) { return new Counter(state.getCount() - 1); } @Dispatchable(ClearCountAction.class) public Counter clear() { return new Counter(0); } } export default function counter(state = 0, action) { switch (action.type) { case 'INCREMENT' : return state + 1 case 'DECREMENT' : return state - 1 default: return state } }