Browse Source

Fix setState example code

Seems to have been a mix of the two examples the section was covering.
main
Thomas Levy 7 years ago
committed by GitHub
parent
commit
1303a3d38c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/docs/reference-react-component.md

2
content/docs/reference-react-component.md

@ -347,7 +347,7 @@ Subsequent calls will override values from previous calls in the same cycle, so
```js ```js
this.setState((prevState) => { this.setState((prevState) => {
return {counter: prevState.quantity + 1}; return {quantity: prevState.quantity + 1};
}); });
``` ```

Loading…
Cancel
Save