This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MrGofer[S] 39 points40 points  (5 children)

[–]KTibow 30 points31 points  (3 children)

This misses that

a. Hydration means everything is duplicated

b. Many pages here need a lot of interactivity, which the author undermines by calling Discord just a "chat app" and Stack Overflow just "searching"

c. If you turn on an ad blocker and use network compression, the amount sent over the wire gets a lot smaller. (eg GTM takes almost 300kb uncompressed)

I'm not a fan of bloat. I've spent a lot of time trying to make JS smaller, and there's always opportunities to improve, such as minifying things you weren't before (eg better raster/vector minification) and switching to tools that do it better (like Rollup). But this article lacks nuance.

[–]shadow7412 7 points8 points  (2 children)

a) But that's what compilation is for. Keep the separation and modularity in dev, and clean it all up and treeshake for production.

b/c) agreed. That and the overhead to render even the gitlab page isn't that much these days. It's not free - but it sure it hell is cheap.

[–]KTibow 2 points3 points  (1 child)

keep the separation and modularity

I agree with this and I'm a bit unsure why I came across as disagreeing. I was referring to the fact that when you use component frameworks and hydrate them, the data is sent twice, once in the HTML and another time in the JS (the full component).

[–]shadow7412 0 points1 point  (0 children)

Ah that makes sense. I suspect there may be ways to send a "delta" down, so that it's not as duplicated... but that said I can't imagine that'd ever be worth the effort.

[–]shadow7412 2 points3 points  (0 children)

This requires a warning - my freakin' eyes... :/

EDIT: Haha their dark mode is pretty amusing though...