-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Description
On line 77 in KanbanBoardContainer.addCard (chapter 5) you have:
newTask.id=responseData.id
this.setState({cards:nextState});
I noticed that you call setState with nextState before the ajax call. And you called setState with nextState after the ajax call. Isn't that mutating the deep state of nextState but returning the same pointer. In other words, why not use the "Immutability Helper update" method?
I thought that the whole reason for using "Immutability Helper update" was because you should't mutate the original object?
Metadata
Metadata
Assignees
Labels
No labels