mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Update state-and-lifecycle.md (#8424)
* Update state-and-lifecycle.md Isn't clock state and props the same in this example? * Clarify
This commit is contained in:
committed by
Dan Abramov
parent
fc3999af09
commit
0741d52cd7
@@ -432,7 +432,7 @@ This also works for user-defined components:
|
||||
<FormattedDate date={this.state.date} />
|
||||
```
|
||||
|
||||
The `FormattedDate` component would receive the `date` in its props and wouldn't know whether it came from the `Clock`'s state, the props, or was typed by hand:
|
||||
The `FormattedDate` component would receive the `date` in its props and wouldn't know whether it came from the `Clock`'s state, from the `Clock`'s props, or was typed by hand:
|
||||
|
||||
```js
|
||||
function FormattedDate(props) {
|
||||
|
||||
Reference in New Issue
Block a user