Replies: 2 comments
-
It honestly doesn't matter a ton except it reduces diffing top level. If we render to body we end up diffing the other script tags and things added to the body and because Solid doesn't know about them we end up possibly removing them. This was just ensure things were cleaner. I believe current start uses |
Beta Was this translation helpful? Give feedback.
-
Thanks @ryansolid for your reply. Indeed I can confirm the scripts get removed even if you're doing something like this <body>
{children}
</body>
<div id="scripts">
{scripts}
</div> ..but I wonder wouldn't this idea raise @nksaraf 's eye brow a little bit? |
Beta Was this translation helpful? Give feedback.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions