Hacker News new | ask | show | jobs
by Isomorpheus 2223 days ago
> Maybe that's just confirmation bias and I just don't notice it as much on sites that do it well

This seems to me to be the key phrase.

I sympathize with all the "JS has gone too far" people in this thread. I also hate bloated JS apps. But, "almost all SPAs are bloated trash" is a distinct claim from "SPAs are intrinsically trash".

In my experience it is possible to have lean, high-performance, accessible SPAs without too much developer difficulty. Svelte (created by the author of this article) is one framework in this space, although I think there are better approaches.

1 comments

Do you know of good SPAs? Sites that feel snappy even though they're SPAs. Most sites I visit that are SPAs are consistently slow so I've learned to make the same association: SPA = bad.
I love this question, in another comment I call it the Fermi paradox of SPAs. Where are they?

The simple question as to where are all these inspiring SPAs that truly push the web to next levels...is completely unanswered.

We get docs sites, demos and blogs. Where when clicking on a link...wow!...it loads without a page refresh. Something possible using simple ajax some 15 years ago.

We've been experiencing sluggish pages since long before JS really became a thing too. PHP and a slow inline query to render results has been a possible problem for literally decades.

Do you investigate all the fast snappy sites you visit to confirm they aren't single page apps? What about the slow pages that aren't SPAs (most every news site)?

It seems like anyone who wants to dislike JS and/or SPAs can easily confirmation-bias their way into believing it.

That's why I asked for examples. I want to know what are the good examples. Someone mentioned the main react site. Seems like a good place to start.
I understand what you mean. In fact, I think we should more frequently do the opposite: we should publicly shame slow websites (cough new Reddit).

Anyway, for fast SPAs, here is a useful comparison: the "RealWorld app" demo.

I would urge everyone to look at the Lighthouse audits for these three implementations:

React/Redux: https://react-redux.realworld.io/

Angular: https://angular.realworld.io/

Vue: https://vue-vuex-realworld.netlify.app/#/

Svelte/Sapper: https://realworld.svelte.dev/

Solid.js: https://ryansolid.github.io/solid-realworld/

This is just a demo, of course, but it is close enough to be representative. From just this simple demo we can already see significant differences: Svelte and Solid.js are much snappier. The author of the article, Rich, created Svelte.

Of course, this is just talking about performance, not yet getting accessibility, navigation, transitions, etc right.

Sure, but demos are a good place to start. Then we can figure out why exactly the non-demos are slow.
It seems like this whole discussion would work better with examples where people are willing to say "This is done well, and it has these benefits from having been done in this way"
Yup.
Thanks. I'll take a look.
Certain, check out https://community.nodebb.org, super quick SPA.