Skip to content

Commit 825bae0

Browse files
authored
Merge pull request reactjs#290 from NilSet/master
Fix setState example code
2 parents 5f9fdad + 1303a3d commit 825bae0

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)