JS: Fix syntax error in js/react/inconsistent-state-update example

This commit is contained in:
Sam Lanning
2018-12-05 16:44:40 -08:00
parent 3c00d4be6d
commit 2ea148016c

View File

@@ -36,9 +36,9 @@ Instead, the callback form of <code>setState</code> should be used:
</p>
<sample language="javascript">
this.setState((prevState) => {
this.setState((prevState) => ({
counter: prevState.counter + 1
});
}));
</sample>
</example>