Live data from Hacker News

New React docs pretend SPAs don't exist anymore

wasp-lang.dev

61–70 of 225 posts

Re: New React docs pretend SPAs don't exist anymore

#61
post #27
post #24

Earlier quoted context omitted.

the biggest problem with SPAs is none of the devs making them seem to remember how nice it was to open different pages of a site in different tabs. it's all horribly phone/tablet centric. middle-clicking doesn't even pop links in new tabs because they break basic browser features. you're lucky if you can even tell what's a real link and what's just going to rearrange your current page.

And even big sites built by well paid engineers that should know better (I’m looking at you Microsoft Azure!) have these issues! Sometimes middle click works. Sometimes it doesn’t. Sometimes right click open in new tab works. It’s so damned annoying.

This often has little or nothing to do with SPAs though. Quoted tweets on Twitter on twitter.com, for example, can’t be right- or middle-clicked for…absolutely no good reason. They just don’t render an . Yet twitter.com is an SPA, and the little “30m” time indicator on a tweet is a fully working that can be right- and middle-clicked and also does a client navigation when clicked normally.

Re: New React docs pretend SPAs don't exist anymore

#62

I don't understand the pivot back to SSR. Tearing down and standing up the entire DOM and page memory between navigations is just unnecessary work. Little things like maintaining scroll position in the page's navigation bar meaningfully improve usability and are only achievable with a SPA-based approach. This doesn't discount the challenges of building SPAs: bundle sizes, performance, etc. can be concerns if not mana…

Fullstack react frameworks aren't purely SSR - they're isomorphic JS apps, which can render an initial page load serverside, then use clientside routing, suspense, serverside components, and clientside rehydration to progressively update the DOM without a full page refresh.

They are basically delivered as SPAs, with an integrated, isomorphic backend-for-frontend service embedded in the origin server.

They just don't feel like SPAs, because they have a multipage (routing) framework, and isomorphic rendering means those paths can be directly loaded from the server - while any subsequent navigation just updates your UI clientside.

In the case of static conteent-based sites, that SSR can even be done ahead of time, as a static built-time render, and the pieces of data needed to load different pieces of content into the SPA ('pages') get dumped out as static JSON resources. That's what Gatsby offers particularly as its specialty versus next.js.

Re: New React docs pretend SPAs don't exist anymore

#63
post #24

Earlier quoted context omitted.

the biggest problem with SPAs is none of the devs making them seem to remember how nice it was to open different pages of a site in different tabs. it's all horribly phone/tablet centric. middle-clicking doesn't even pop links in new tabs because they break basic browser features. you're lucky if you can even tell what's a real link and what's just going to rearrange your current page.

This only happens now with an SPA due to laughable incompetence or deliberate disregard. You have to go out of your way to not use whatever Link component or similar tool provided by your SPA library/framework of choice. Any team that incompetent or negligent would be just as likely to break link behavior even if they aren’t using an SPA. I’m surprised the criticism is still ubiquitous: it’s either 5+ years out of da…

These criticisms are still ubiquitous because these sites are still ubiquitous.

For example, less than 2 years ago someone did a "Show HN" of a Shopify front end they launched for their wife that was literally almost entirely nonfunctional. Not exaggerating.

https://news.ycombinator.com/item?id=27182932

Re: New React docs pretend SPAs don't exist anymore

#64
post #18

There are a myriad of reasons why I prefer SPA to server rendered content for most applications. The main exception is if I have a public facing, unauthenticated application that I need indexed, I'll go for SSR. Off the top of my head, here are benefits to SPA: - I can just serve a few static files from a CDN. Every user gets the same client. - Most requests made by the application are actually smaller. I'm just load…

Bravo, I agree with all your points.

React frameworks are mostly hype in order to justify using a particular PaaS. They’ve hired all the influencers and using it to their advantage.

There definitely are good reasons to use SSR and these frameworks, but a fully interactive web app that acts like a desktop app isn’t one of them.

All of that to say I have no issues with it and react is still awesome. It’s a view _library_ and works great for its relatively restrained API. Most of the new features are opt-in and I don’t really touch them (besides hooks).

Re: New React docs pretend SPAs don't exist anymore

#65

I don't understand the pivot back to SSR. Tearing down and standing up the entire DOM and page memory between navigations is just unnecessary work. Little things like maintaining scroll position in the page's navigation bar meaningfully improve usability and are only achievable with a SPA-based approach. This doesn't discount the challenges of building SPAs: bundle sizes, performance, etc. can be concerns if not mana…

Modern SSR is for the first page load. After this all navigation and interaction is AJAX.

Re: New React docs pretend SPAs don't exist anymore

#66

So after graphql, micro services, nosql and serverless, the SPA + "libs not framework" crowd join the "woooops!" club. Ignoring the noise is really becoming a key skill to survive as a programmer.

Being too eager to dismiss a technology and move on is just as much of a bandwagon-jump as being too eager to adopt it in the first place.

The Gartner Hype Cycle[1] has both a 'peak of inflated expectations' and a 'trough of disillusionment'.

The thing a lot of tech cynics fail to spot is that both of them are wrong about the long term value of the technology.

The 'plateau of productivity' awaits, where graphql, nosql, serverless, and SPAs will join every other technology, finding productive use in their appropriate niche.

[1] https://en.wikipedia.org/wiki/Gartner_hype_cycle

Re: New React docs pretend SPAs don't exist anymore

#67
post #63

Earlier quoted context omitted.

This only happens now with an SPA due to laughable incompetence or deliberate disregard. You have to go out of your way to not use whatever Link component or similar tool provided by your SPA library/framework of choice. Any team that incompetent or negligent would be just as likely to break link behavior even if they aren’t using an SPA. I’m surprised the criticism is still ubiquitous: it’s either 5+ years out of da…

These criticisms are still ubiquitous because these sites are still ubiquitous. For example, less than 2 years ago someone did a "Show HN" of a Shopify front end they launched for their wife that was literally almost entirely nonfunctional. Not exaggerating. https://news.ycombinator.com/item?id=27182932

Has that page changed a lot since then? Every link out of a dozen or so that I quickly checked were all real tags that worked fine with middle- and right-clicking. I couldn't reproduce the back button behavior in your complaint either.

Re: New React docs pretend SPAs don't exist anymore

#68

I don't understand the pivot back to SSR. Tearing down and standing up the entire DOM and page memory between navigations is just unnecessary work. Little things like maintaining scroll position in the page's navigation bar meaningfully improve usability and are only achievable with a SPA-based approach. This doesn't discount the challenges of building SPAs: bundle sizes, performance, etc. can be concerns if not mana…

Since when have SPAs figured out maintaining scroll position? That's not my experience at all.

What is going to change the scroll position on a state or "page" change? It's not that they figured it out, it's just the nature of a single page.

Re: New React docs pretend SPAs don't exist anymore

#69
post #24

Earlier quoted context omitted.

the biggest problem with SPAs is none of the devs making them seem to remember how nice it was to open different pages of a site in different tabs. it's all horribly phone/tablet centric. middle-clicking doesn't even pop links in new tabs because they break basic browser features. you're lucky if you can even tell what's a real link and what's just going to rearrange your current page.

I don't understand this. All the popular/used routing frameworks by default support "open link in new tab" (render , and listen to onClick to do SPA transition). Developer have to deviate from the easy and commonly documented way of doing things to break this. Any website that doesn't do this is fundamentally broken and built by teams that deliberately disregarded this behaviour.

I don't know which sites use what particular frameworks and paradigms (and I don't recall offhand which sites I've had these problems with), but I frequently have problems with sites that will, when I command-click on a link (standard shortcut to open in new tab on Mac), either open the page in the new tab and change the current tab to it, or just completely ignore my expressed desire and only change the current tab.

"But all the frameworks support doing the good thing! But only people who are bad at it make bad UX!"—well, it's still happening. No amount of contempt for the people doing it changes that.

Re: New React docs pretend SPAs don't exist anymore

#70
post #63

Earlier quoted context omitted.

These criticisms are still ubiquitous because these sites are still ubiquitous. For example, less than 2 years ago someone did a "Show HN" of a Shopify front end they launched for their wife that was literally almost entirely nonfunctional. Not exaggerating. https://news.ycombinator.com/item?id=27182932

Has that page changed a lot since then? Every link out of a dozen or so that I quickly checked were all real tags that worked fine with middle- and right-clicking. I couldn't reproduce the back button behavior in your complaint either.

Yeah, Looks like the store has been fixed.
Post reply on HN