Given a top-level App
component that renders the following heirarchy:
<Parent>
<Child />
</Parent>
If both Parent
and Child
call the same hook to obtain some global state, and that state changes, will Parent
or Child
be re-rendered first?
Also, say they both use some variable, user
, from global state, and that Parent
only renders its children
prop if user
is not undefined. Will the Child
prop ever be rendered with an undefined
user
?