I try to present landing element just before rendering React component at first mount when access my web service.
I refered to this stackoverflow issue
When I add adjacent sibling element of root element as landing element, the element just removed just after React Main component rendered. So, I don't need to do add/remove className etc.
But, I want to give animation about "fade out" effect to landing page. I can't. Because it was removed from DOM right after React component rendered.
So, I placed landing element to right before root div element in index.html and it was not removed after React component renderd. Then, finally I can present fade out effect of landing element.
I'm wondering, officialy ReactJS remove adjacent sibling element of root element And not remove forwared sibling element??
Is there any explanation page about it in official React web site?
Or
is it just accidental action I found?
// index.html
// this is couldn't give effect
<div id="root"></div>
<div class="landing"></div>
// This is possible to make effect
<div class="landing"></div>
<div id="root"></div>