A top-level App
component returns <Button />
from its render()
method.
-
What is the relationship between
<Button />
andthis
in thatButton
’srender()
? -
Does rendering
<Button><Icon /></Button>
guarantee that anIcon
mounts? -
Can the
App
change anything in theButton
output? 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,
Button
have 2 child:Icon
andimg
which are both vDOM elements. Note that<img />
is a valid DOM element but at this stage, it is still a vDOM element.