On the desktop version, the component is structured like this:
<div className="parent-comp">
<div id="child-1" />
<div id="child-2" />
</div>
However, on the mobile version, it switches to:
<div className="parent-comp">
<div id="child-2" />
<div id="child-1" />
</div>
Is there a way to avoid having to recreate child-1
and child-2
each time the screen size changes from mobile to desktop?