News for hackers. Stuff that matters.
Re:New React docs pretend SPAs don't exist anymore by knome on Friday March 17, 2023 @07:35PM (#35204332)
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.
Re:New React docs pretend SPAs don't exist anymore by wincy on Friday March 17, 2023 @07:37PM (#35204350)
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.
Re:New React docs pretend SPAs don't exist anymore by tshaddox on Friday March 17, 2023 @08:33PM (#35204752)
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 <a>. Yet twitter.com is an SPA, and the little “30m” time indicator on a tweet is a fully working <a> 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 by kitsunesoba on Friday March 17, 2023 @07:50PM (#35204466)
Find in Page is another common casualty, and frustratingly it’s not always re-implemented by the SPA.

I think a lot of the ire against SPAs and other flavors of JS heavy pages would dissipate if devs made a point of trying to not unnecessarily break browser features and when breakage is unavoidable, furnishing replacements for the broken features that are as good as or better than the originals.

Re:New React docs pretend SPAs don't exist anymore by madeofpalk on Friday March 17, 2023 @08:09PM (#35204587)
I don't understand this. All the popular/used routing frameworks by default support "open link in new tab" (render <a href="..." />, 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.
Re:New React docs pretend SPAs don't exist anymore by danaris on Friday March 17, 2023 @08:47PM (#35204845)
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 by tshaddox on Friday March 17, 2023 @08:23PM (#35204676)
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 date or some people run into these terrible sites a lot for some reason.

Re:New React docs pretend SPAs don't exist anymore by astura on Friday March 17, 2023 @08:38PM (#35204787)
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 that was literally almost entirely nonfunctional.

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

Re:New React docs pretend SPAs don't exist anymore by tshaddox on Friday March 17, 2023 @08:46PM (#35204833)
Has that page changed a lot since then? Every link out of a dozen or so that I quickly checked were all real <a> 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 by astura on Friday March 17, 2023 @08:53PM (#35204878)
Yeah, Looks like the store has been fixed.