A top-level App component returns <Button /> from its render() method.
-
What is the relationship between
<Button />andthisin thatButton’srender()? -
Does rendering
<Button><Icon /></Button>guarantee that anIconmounts? -
Can the
Appchange anything in theButtonoutput? What and how?
@harmony7 Yes, sorry to clarify my previous, I was referring to
render()returning a single vDOM element that could contain children vDOM elements. These vDOM elements, when mounted to the DOM, becomes DOM elements.So for example:
In the example above,
Buttonhave 2 child:Iconandimgwhich are both vDOM elements. Note that<img />is a valid DOM element but at this stage, it is still a vDOM element.