-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
I think you are mutating the state at the following lines:
full-stack-serverless-code/graphql/src/App.js
Lines 83 to 84 in 44c4eb2
| const notes = [...state.notes] | |
| notes[index].completed = !note.completed |
Since each note is an object, setting notes[index].completed property is mutating the note object. Instead, we should create a new note object like this:
const notes = [...state.notes]
notes[index] = { ...state.notes[index], completed: !note.completed }shunexe
Metadata
Metadata
Assignees
Labels
No labels