Merge pull request #627 from samlanning/inconsistentStateExample

JS: Fix syntax error in js/react/inconsistent-state-update example
This commit is contained in:
Max Schaefer
2018-12-06 08:03:32 +00:00
committed by GitHub

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>