Live data from Hacker News

New React docs pretend SPAs don't exist anymore

wasp-lang.dev

41–50 of 225 posts

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

#41
post #39

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.

SPAs, microservices, nosql (Redis), and serverless are all still alive and well, they just aren’t a hammer for all problems like (some) people treated them originally. Nerds getting overexcited about new tech is an old story and it will continue to happen indefinitely as much as we like to smug post about it. IDK about GraphQL since I’ve not used it but I’ve read lots of stuff recently about frameworks/ORMs working t…

That's exactly my point.

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

#42
post #30

Earlier quoted context omitted.

"The core of Next.js has been designed to enable starting as a static site" is a little contradicted by the fact static export is considered an 'advanced feature' though. That said, I'm not sure why running `next export` is considered 'advanced'.

I'd say this is documentation organization "debt" – there's a bunch of "advanced" features that aren't that advanced. We're aware and fixing with the new docs -> https://beta.nextjs.org/

The part about this that bothers me is it not being documented well is in vercels financial interest

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

#43

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.

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

#45

I'm still waiting for preact.js + htmx.org mashup. It probably exists somewhere, maybe https://docs.astro.build/en/concepts/islands/ or something. I just want a quick way to throw some react hooks or web components into a dom element using a library that is less than 1,000 lines of code.

Why do I hear so much about htmx and so little about unpolly, which seems everything htmx promise but with additional high level primitives for the common task?

Unpoly dev is german nobody cares about abd doesnt go on podcasts vs htmx author is american that does marketing well. Same goes for alpine js where the author is “famous” dev.

Pretty typical with open source projects tbh. Many of them win thanks to marketing more than anything else.

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

#46

If you want the control and low overhead of Vite but don't want to implement everything a framework gives you, vite-plugin-ssr might be interesting for you. It is basically Next.js as a do-one-thing-well Vite plugin (its slogan). https://vite-plugin-ssr.com/

That looks perfect for what I was looking for on a side project. I hope they don’t end up bloating up over the years via endless user demands and turn into another Next.js. More like a Sinatra vs Rails.

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

#47
post #38

I'm still waiting for preact.js + htmx.org mashup. It probably exists somewhere, maybe https://docs.astro.build/en/concepts/islands/ or something. I just want a quick way to throw some react hooks or web components into a dom element using a library that is less than 1,000 lines of code.

Sorry but thats not a good combo. htmx is literally html extension. it is aimed at adding interaction to static html. Preact/react are completely opposite approach to that.

A lot of people still mix jQuery and React in the same parent project. Mostly just via legacy support when using existing serverside frameworks but still sometimes having the fallback easy DOM/event stuff is just easier when you need to get it done (keeping the HTML/views isolated from each other of course so you don’t mix concepts). It doesn’t sound pretty but they can serve dual purposes. I don’t know enough about HTMX on how it would work implementation wise though and what type of setup.

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

#49
post #4

Wasp is a pretty interesting project. Actually waiting until they are not react-only (if that will ever happen).

glad you find it interesting! the plan is to support more frameworks/langs moving forward. The poly-frontend option might be even fairly easier to introduce since Wasp is doing more stuff closer to the server.

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

#50
post #47
post #38

Earlier quoted context omitted.

Sorry but thats not a good combo. htmx is literally html extension. it is aimed at adding interaction to static html. Preact/react are completely opposite approach to that.

A lot of people still mix jQuery and React in the same parent project. Mostly just via legacy support when using existing serverside frameworks but still sometimes having the fallback easy DOM/event stuff is just easier when you need to get it done (keeping the HTML/views isolated from each other of course so you don’t mix concepts). It doesn’t sound pretty but they can serve dual purposes. I don’t know enough about…

I am sure you can do something with it…

But htmx is all about replacing server rendered html with server rendered html partials. I would like to see what reacts vdom does when you keep ploping some partials into DOM it thinks it controls.

Post reply on HN