Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
atombender
on April 18, 2017
|
parent
|
context
|
favorite
| on:
Facebook Announces React Fiber, a Rewrite of Its R...
Fortunately, componentWillMount is largely made redundant by the use of constructors.
madeofpalk
on April 19, 2017
[–]
Except it's not for when you actually want to know when the component was put into the DOM, or you're running react server-side
wayfarer2s
on April 19, 2017
|
parent
[–]
> 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
on April 19, 2017
|
root
|
parent
|
next
[–]
Yes, componentDidMount is the place to work with DOM. componentWillMount never worked this way—it is basically a glorified constructor from pre-ES6 era.
madeofpalk
on April 19, 2017
|
root
|
parent
|
prev
[–]
Oh apologies - I really the comment as componentDidMount. My bad.
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: