mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-24 20:53:08 +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
de7e8a4709
commit
3b671d1d1b
@@ -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