Browse Source

Moved a bracket in the setState function example (#2164)

main
corinty 5 years ago
committed by GitHub
parent
commit
bc060f5edd
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

@ -501,7 +501,7 @@ There are just two of them: `setState()` and `forceUpdate()`.
### `setState()` {#setstate}
```javascript
setState(updater[, callback])
setState(updater, [callback])
```
`setState()` enqueues changes to the component state and tells React that this component and its children need to be re-rendered with the updated state. This is the primary method you use to update the user interface in response to event handlers and server responses.

Loading…
Cancel
Save