reactjs/react-tutorial

Fails to roll back optimistic update after error

tsongas opened this issue · 2 comments

Shouldn't we do something like this.setState({data: comments}); before logging the error to the console on line 58 of example.js? Otherwise comments.json and current state will be out of sync after an error.

I submitted a PR to fix this :).

zpao commented

Thanks for fixing!