mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 20:23:08 +00:00
Clarifies "Fetching from the server"
This commit is contained in:
@@ -347,6 +347,8 @@ React.render(
|
||||
|
||||
This component is different from the prior components because it will have to re-render itself. The component won't have any data until the request from the server comes back, at which point the component may need to render some new comments.
|
||||
|
||||
Note: the code will not be working at this step.
|
||||
|
||||
### Reactive state
|
||||
|
||||
So far, based on its props, each component has rendered itself once. `props` are immutable: they are passed from the parent and are "owned" by the parent. To implement interactions, we introduce mutable **state** to the component. `this.state` is private to the component and can be changed by calling `this.setState()`. When the state updates, the component re-renders itself.
|
||||
|
||||
Reference in New Issue
Block a user