Re:JavaScript hydration is a workaround, not a solution
by quest88 on Thursday September 01, 2022 @11:16AM
(#32677588)
I think the point is people should use the correct tool for the job. Instead, sites that should (or can) be static sites are unnecessarily using some JS framework.
Re:JavaScript hydration is a workaround, not a solution
by zozbot234 on Thursday September 01, 2022 @11:22AM
(#32677686)
Newer JS frameworks like Svelte and SolidJS can be almost transparent to the user, though - with no need for bootstrapping a complex codebase in the client before they can interact with the site. I'm guessing that OP describes a further development along these lines.
Re:JavaScript hydration is a workaround, not a solution
by jozzy-james on Thursday September 01, 2022 @03:24PM
(#32681700)
i think you're conflating static sites with sites that lean heavily into JS frameworks. plenty of sites are not static, cause they need that whole session thing, and don't use JS frameworks
Re:JavaScript hydration is a workaround, not a solution
by zozbot234 on Thursday September 01, 2022 @11:04AM
(#32677358)
HTML has native support for lazy-loading images these days. No need for added JS.
Re:JavaScript hydration is a workaround, not a solution
by scrollaway on Thursday September 01, 2022 @01:31PM
(#32679923)
You can lazy-load a lot more than images. In my example, yes I wouldn't use js for it, but it's irrelevant to the point I was making. My read of GGP is that "lazy loading is useless because you shouldn't have so much content that it's needed, ever", which is a bad take.
Re:JavaScript hydration is a workaround, not a solution
by jozzy-james on Thursday September 01, 2022 @03:25PM
(#32681716)
it does, but when design and top brass say it needs to fade in - back to some JS you go
Re:JavaScript hydration is a workaround, not a solution
by jozzy-james on Thursday September 01, 2022 @03:23PM
(#32681677)
> FOUC would still be an issue.
hell, just using webfonts can cause FOUC - no JS needed.
What's your point here, exactly? That if random wordpress blogs and recipe websites were less wasteful, the problems these solutions are addressing would not exist?
I can make you an extremely non-wasteful webapp which still needs to display a hundred images on a page (because reasons), so lazy-loading the images is still important.
I can find you a very well-optimized website that is only a few kilobytes, but still loads slow as shit because their network is bad and I'm on a terrible 3G link. FOUC would still be an issue.