redux ditambahkan ke array
case ADD_ITEM :
return {
...state,
arr: [...state.arr, action.newItem]
}
Enthusiastic Earthworm
case ADD_ITEM :
return {
...state,
arr: [...state.arr, action.newItem]
}
case ADD_ITEM :
return {
...state,
arr: [...state.arr, action.newItem]
}
OR
case ADD_ITEM :
return {
...state,
arr: state.arr.concat(action.newItem)
}