Browse Source

Update reference-react-component.md (#609)

`just before` sounds better than `immediately before`.
main
G Akshay 7 years ago
committed by Dan Abramov
parent
commit
10c3a91538
  1. 2
      content/docs/reference-react-component.md

2
content/docs/reference-react-component.md

@ -186,7 +186,7 @@ If you "fork" props by using them for state, you might also want to implement [`
componentWillMount() componentWillMount()
``` ```
`componentWillMount()` is invoked immediately before mounting occurs. It is called before `render()`, therefore calling `setState()` synchronously in this method will not trigger an extra rendering. Generally, we recommend using the `constructor()` instead. `componentWillMount()` is invoked just before mounting occurs. It is called before `render()`, therefore calling `setState()` synchronously in this method will not trigger an extra rendering. Generally, we recommend using the `constructor()` instead.
Avoid introducing any side-effects or subscriptions in this method. For those use cases, use `componentDidMount()` instead. Avoid introducing any side-effects or subscriptions in this method. For those use cases, use `componentDidMount()` instead.

Loading…
Cancel
Save