You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't remember now why I was frustrated by this earlier in the week but I'd expect the inner component to be mounted completely before the outer component's componentDidMount method runs so that it can rely on the children being fully mounted.
Agree/disagree?
The text was updated successfully, but these errors were encountered:
I can see why that would cause issues… The way you're thinking about sounds like common sense so I hope that's actually true and that we're just firing these callbacks in the wrong order. So I agree, but that's without looking at the code closely
I think this makes sense. Here's my reasoning: One of the few valid reasons for wanting to use componentDidMount(node) (besides integrating with other frameworks) is to measure something's container. In order to do that accurately, the children might also want to have measured their own containers. For the parent's measurement to be accurate, the child's componentDidMount must have already completed.
Currently, when mounting two nested components, componentDidMount fires on the outer element before the inner one:
http://jsfiddle.net/spicyj/udaq9/
I can't remember now why I was frustrated by this earlier in the week but I'd expect the inner component to be mounted completely before the outer component's componentDidMount method runs so that it can rely on the children being fully mounted.
Agree/disagree?
The text was updated successfully, but these errors were encountered: