add new object into array via reducer 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]
}