Here is my reducer in which when todo id matches with the id of payload in action it changes the value but i want to use object.assign metod .

```
case EDIT_TODO:

  return state.map(todo => {
    if(todo.id === action.payload.id){
        return {
          ...todo,
         text: action.payload.text
        }
      }
      return todo;
    });

```