(state, action)
| 22 | } |
| 23 | |
| 24 | export function reducer(state, action) { |
| 25 | switch (action.type) { |
| 26 | case types.ADD: |
| 27 | return { ...state, items: [...state.items, action.payload] } |
| 28 | case types.REMOVE: |
| 29 | return { |
| 30 | ...state, |
| 31 | items: state.items.filter((item) => item.id !== action.payload), |
| 32 | } |
| 33 | } |
| 34 | } |
nothing calls this directly
no outgoing calls
no test coverage detected