const initialState = { count: 100, fifeTHousend: 5000, }; export default function reducer(state = initialState, action) { switch (action.type) { case "count/increaseBy": return { ...state, count: state.count + action.amount }; case "count/decreaseBy": return { ...state, count: state.count - action.amount }; case "count/setToFiveThousand": return { ...state, count: state.fifeTHousend }; default: return state; } }