how to assign an array in reducer and then push to it code example
Example: redux append to an array
case ADD_ITEM :
return {
...state,
arr: [...state.arr, action.newItem]
}
case ADD_ITEM :
return {
...state,
arr: [...state.arr, action.newItem]
}