Pwnage5
1
I think Mosh made a mistake implementing the handleReset for reseting counters.
handleReset = () => {
const counters = this.state.counters.map((c) => {
c.value = 0;
return c;
});
this.setState({ counters });
};
The state is being modified directly?
Pwnage5
3
Actually, I don’t think he did .
And he also made the same mistake in section 8 - Calling Backend Services video 7- Updating Data
That is why it doesn’t work if you try to implement optimistic updates.