Skip to content

Commit 1303a3d

Browse files
authored
Fix setState example code
Seems to have been a mix of the two examples the section was covering.
1 parent 5f9fdad commit 1303a3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/reference-react-component.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ Subsequent calls will override values from previous calls in the same cycle, so
347347

348348
```js
349349
this.setState((prevState) => {
350-
return {counter: prevState.quantity + 1};
350+
return {quantity: prevState.quantity + 1};
351351
});
352352
```
353353

0 commit comments

Comments
 (0)