Если без immutablejs, то:
1.
return {
...state,
items: [
...state.items,
action.payload,
],
2.
return {
...state,
items: state.items.map((item) => {
if (item.id === action.payload.id) {
return {
...item,
name: action.payload.name,
};
}
return item;
}),
};