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?
this
inside the Button's render method should also point to the instance rendered by React so I'm going to say both andthis
point to the same object.render
method. Typing them out and assigning it to a variable doesn't, unless you then return that variable.