Browse Source

Update state-and-lifecycle.md (#8424)

* Update state-and-lifecycle.md

Isn't  clock state and props the same in this example?

* Clarify
main
Van der Auwermeulen Grégoire 8 years ago
committed by Dan Abramov
parent
commit
3b671d1d1b
  1. 2
      docs/state-and-lifecycle.md

2
docs/state-and-lifecycle.md

@ -432,7 +432,7 @@ This also works for user-defined components:
<FormattedDate date={this.state.date} /> <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 ```js
function FormattedDate(props) { function FormattedDate(props) {

Loading…
Cancel
Save