2 ms·
> when you actually want to know when the component was put into the DOM You can use componentDidMount for that and its semantics are still the same.
by wayfarer2s 9y ago
> when you actually want to know when the component was put into the DOM
You can use componentDidMount for that and its semantics are still the same.
- danabramov 9y agoYes, componentDidMount is the place to work with DOM. componentWillMount never worked this way—it is basically a glorified constructor from pre-ES6 era.
- madeofpalk 9y agoOh apologies - I really the comment as componentDidMount. My bad.