mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #4610 from lili21/fix-component-api-doc
update component api docs
This commit is contained in:
@@ -16,7 +16,7 @@ Instances of a React Component are created internally in React when rendering. T
|
||||
```javascript
|
||||
setState(function|object nextState[, function callback])
|
||||
```
|
||||
Merges nextState with the current state. This is the primary method you use to trigger UI updates from event handlers and server request callbacks.
|
||||
Performs a shallow merge of nextState into current state. This is the primary method you use to trigger UI updates from event handlers and server request callbacks.
|
||||
|
||||
The first argument can be an object (containing zero or more keys to update) or a function (of state and props) that returns an object containing keys to update.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user