Skip to content

Comment on Why I hate your Single Page App (2016)parent

Comments

Two of those three are simple content sites. Why even use JS at all? I feel like we're reinventing the wheel with a ton of added complexity these days.

JS is used for fast page transitions and stuff like that, but funny enough I'm pretty sure I end up shipping less JS overall by running server-side JS.

Last I checked, a Tweet embed alone was several mbs of JS, and it causes a bunch of layout shift and loads third party resources. On my blog they're pre-rerendered and shipped statically[1]

Probably the strongest reason though is to not set a 'power cap' on your project unnecessarily. It'd suck to have to rewrite a project because you got trapped in a local maxima, which is why i always share you can have your 100 lighthouse cake & eat it too.

[1] https://rauchg.com/2021/making-the-web-faster#next-momentum

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.