Update single value in item array | react redux
I have a todo list and want to set the state of that item in the array to "complete" if the user clicks on "complete". Here is my action: export function completeTodo(id) { return { type: "COMPLETE_TASK", completed: true, id } } Here is my reducer: case "COMPLETE_TASK": { return {...state, todos: [{ completed: action.completed }] } } The problem I'm having is the new state does no longer have the text associated of that todo item on the selected item and the ID is no longer there. Is this because I am overwriting the state and ignoring the previous properties? My object item onload looks like