6 Matching Annotations
- Sep 2020
-
stackoverflow.com stackoverflow.com
-
I don't think componentDidRender is a substitute for componentDidMount because the component can render multiple times when props change after it's mounted once.
-
so mount can be called "placed"?
-
Ignoring React you can think of these two native functions as mounting: replaceChild appendChild Which are likely the most common functions React uses to mount internally.
-
Mounting refers to the component in React (created DOM nodes) being attached to some part of the document. That's it!
-
And, yes, Mounting is also an unfortunate/confusing name, if you ask me. IMHO componentDidRender and componentWillRender would be much better names.
-
This process of creating instances and DOM nodes corresponding to React components, and inserting them into the DOM, is called mounting.
-