With the advent of new tech comes new opportunities, so I'm just wondering, if all gets modernized and re-invented, why not make the DOM faster by rendering/mounting directly into the document.body. Why not FIX this, IMO, broken pattern for good.
What I mean is: instead of having
<!-- the current output markup -->
<html>
<head />
<body>
<div id="root">
<header />
<main />
<footer />
</div>
</body>
</html>
with mounting directive render(App, document.getElementById('root'))...
We should have
<!-- the desired output markup -->
<html>
<head />
<body>
<header />
<main />
<footer />
</body>
</html>
with mounting directive render(App, document.body).
Wouldn't this make more sense for a faster and more modern things to come with say... SolidStart or Vite examples?
PS: I've asked you Ryan during your last stream but you ignored it, probably for good reason.
With the advent of new tech comes new opportunities, so I'm just wondering, if all gets modernized and re-invented, why not make the DOM faster by rendering/mounting directly into the
document.body. Why not FIX this, IMO, broken pattern for good.What I mean is: instead of having
with mounting directive
render(App, document.getElementById('root'))...We should have
with mounting directive
render(App, document.body).Wouldn't this make more sense for a faster and more modern things to come with say... SolidStart or Vite examples?
PS: I've asked you Ryan during your last stream but you ignored it, probably for good reason.