in example/state/reducers/app/visuals.ts [12:22]
export default function reduce(state = INITIAL_STATE, action) {
let result = state;
if (action.type === Actions.INCREMENT) {
result = { ...state, value: state.value + 1 };
} else if (action.type === Actions.DECREMENT) {
result = { ...state, value: state.value - 1 };
} else if (action.type === Actions.PICK_RANDOM_COLOR) {
result = { ...state, color: randomColor() };
}
return result;
}