mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
JS: Fix syntax error in js/react/inconsistent-state-update example
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user