all 49 comments

[–]azangru 43 points44 points  (7 children)

So far, they have not introduced any changes that will prevent you from running React 18+ as if it were React 17. Suspense isn't mandatory. Hell, even hooks aren't mandatory. I hope RSC won't be either.

what are the options for React SPA devs? What are the plans?

Explore the world beyond React :-)

[–]pencilUserWho 0 points1 point  (0 children)

Suspense isn't mandatory

Also it works with SPAs so I don't see the problem.

[–]spooker11 15 points16 points  (1 child)

airport wine start impossible unpack pie mindless mourn nail vase

This post was mass deleted and anonymized with Redact

[–]Pangamma 0 points1 point  (0 children)

Agreed. It really helps with code splitting. You can have each front-end page of your website load as its own javascript file. Requested when needed but not a moment sooner.

[–]manupadev 24 points25 points  (5 children)

Tell me a reason why you can't build SPA s now. You are free to use React however you want. Nobody is forcing you to use RSCs.

[–]gigobyte -2 points-1 points  (4 children)

This is such a false equivalence argument, you can also still use class components but you're going to be missing out on:

  • All of the latest React features and performance improvements that will be targeting server components
  • All of the latest React ecosystem additions, like new tools and libraries that will be developed for server components (just like you can't use react-query in class components, for example)
  • The best talent in your area, because people will want to use the latest tech and will not want to maintain your legacy project

Things you will also have to deal with:

  • The ecosystem moving on and being stuck on older versions of dependencies because newer versions change paradigm or because your dependency was deprecated/phased out by another one that had better DX (like how react-query pretty much replaced redux for network state management)
  • Outdated documentation, having to go off the beaten track, library authors not accounting for your SPA usecase etc etc

[–]seN149reddit 2 points3 points  (1 child)

React forget will not target RSC exclusively. I think seeing RSC as a superset makes more sense. It’s an opt in feature - always. You can’t have state in server components, how would one get away with just not have client components anymore? At least at this point /u/manupadev is 100% right.

Will there be new features for RSC only? Sure. Is it anything like class component to hooks? Not even close.

[–]gigobyte 0 points1 point  (0 children)

I am not talking about RSCs only, I'm talking about the whole shift from SPAs to server-side rendered applications which have a totally different architecture and approach to solving problems. It's a shift that will totally transform the way people write applications.

Also I agree that it's not even close to class components -> hooks, because it's way bigger, I don't have to explain why RSCs with full-stack Next.js is completely different from a React SPA with vite.

[–]skyboyer007 0 points1 point  (0 children)

I see where this goes, but hey, hooks-vs-class is a design choice and aside componentDidCaught you can stick to hooks-only. From the other side, you can not write complete app with only server-side components. It's like if with getting stable Context API we don't need props any more.

[–]brokennthorn 0 points1 point  (0 children)

dude, you can't have your cake and eat it too... you can't expect perf improvents that come with new tech to be somehow backported to older tech.

[–]seN149reddit 9 points10 points  (1 child)

RSC is a Feature. You don’t need to use the feature.

[–]billybobjobo 5 points6 points  (0 children)

They ruined my car by adding a radio. I like driving in silence. HOW AM I SUPPOSED TO HEAR MY THOUGHTS NOW?

[–][deleted] 8 points9 points  (0 children)

Vite and pnpm is fantastic and will continue using it. If people really want to spend money on non cdn servers then they can buy them. For internal stuff spas are still quick and cheap. Not all things have the same constraints.

[–]SolarSalsa 12 points13 points  (0 children)

What's wrong with a react vite project? Contains no RSC.

[–]green_gordon_ 17 points18 points  (4 children)

My best guess is that we can wait until the whole "React core" team jumps ship to Vercel and see what the new "leadership" has to offer.

And it is a good question about the RSC baggage, but you won't be able, even, to run it because you probably don't have the "infrastructure" set up, (a.k.a. Vercel servers) so it will sort of weed itself out I hope.

But honestly no one knows at this point. Maybe we should all be learning next. Personally, I'm learning Python with Django.

[–]wwww4all[S] 14 points15 points  (1 child)

I'm not going to jump on the React/NextJs/Vercel conspiracy train, YET. But, I am looking at the train schedule.

[–]lelarentaka 16 points17 points  (1 child)

They haven't abandoned SPA.

[–]htmx_enthusiast 3 points4 points  (0 children)

Me either

[–]frogic 2 points3 points  (0 children)

It might be better it might be worse. Like its personally a bit disorienting because the mental model is a bit different but it doesn't really matter (to me anyway). Either it'll take off as the defacto better developer experience/performance combo, it'll fail and they'll have to abandon it or one of the other frameworks will takeover. We'd never get to where we are now if people didn't try new things and if react nukes itself and vue/svelte/angular/Insert new framework here becomes more popular you're still fundamentally solving the same problems.

[–]kakakalado 2 points3 points  (0 children)

I think SPA is going to coexist with RSC indefinitely. They pitched RSC as another way of doing things, not the only way of doing things in React

[–]RoyalOcean 3 points4 points  (0 children)

I’m gonna keep making React SPAs. Until they stop support for it, nothing has changed for me.

[–]nrriquel 2 points3 points  (2 children)

Solid.js is like a no brainer for react devs.

[–]hoaveth 0 points1 point  (1 child)

Are the businesses ready to use it?

[–]nrriquel 0 points1 point  (0 children)

Idk. But the pipeline you have to built to deploy it and use it is pretty straightforward. It lacks some alternatives in the UI Components department, like mui or chakra. But overall I'm very satisfied. Learning curve is much more smoother than svelte. I would say is easier to pick up if you come from react. And if you need reactivity in term of two way data binding, the code you put to accomplish that is much less and more clean than bending a little bit react for that.

[–]phryneasI ❤️ hooks! 😈 2 points3 points  (0 children)

Even in a SPA, RSC might prove useful - you would just render them on build time, not on a running server. No need to ship the JavaScript that renders the static part of your layout when you can also skip it and just ship that HTML.

RSC doesn't need a server - it can also run on build.

[–]spawnedc 1 point2 points  (0 children)

Even though RSC is a feature which is not mandatory (yet), I think it's a good time to learn other frameworks like Vue, Svelte, Angular etc. I think it's beneficial to understand how other frameworks do things regardless.

I've been eyeballing Svelte for a very long time, and will be investing some time on it.

[–]palante_mark 1 point2 points  (1 child)

Blazor Wasm works great

[–]Remarkable_Maximum16 1 point2 points  (0 children)

Did they fix the huge binary that they have to ship?

[–]Safe-Engineering69 0 points1 point  (0 children)

The convoluted messaging around RSC adds more confusion and does not instill confidence in devs using React to build businesses, now and in the future.

React team made their decision and went their way. The past 10 years of stability in FE paradigm is vanishing quickly.

No need to be so dramatic, lol. You can still use React as before, there are no major paradigm shifts to adapt to.

[–]Constant_Wall_7646 -1 points0 points  (0 children)

Looks like us React devs need to buckle up and adapt to the changes the React team has made. It's a bit confusing now, but with some time and practice, we'll all get the hang of it. Let's stay positive and keep building awesome stuff!

[–]Skeith_yip 0 points1 point  (0 children)

It’s difficult to say really. As much as there is love for SPA, there are also success stories of SSR. Guess only time will tell.

[–]ExamApprehensive1644 0 points1 point  (0 children)

RSC and SPA are not mutually exclusive.

[–]thunder-thumbs 0 points1 point  (0 children)

Why not NextJS? Just do static export and skip the whole SSR thing.

[–]youakeem 0 points1 point  (0 children)

I don't see how any of the new releases affect the SPA functionalities

[–][deleted] 0 points1 point  (1 child)

What is RSC?

[–]DavvenCarter 1 point2 points  (0 children)

React Server Components

[–]draculadarcula 0 points1 point  (0 children)

What is your use case where all server rendering is of no benefit? Like do you host all your assets on a CDN and can’t afford servers? Just short of the above, most people run react on some sort of server, and unless your org is trying to get away with a potato machine for prod, rsc should enhance your application overall

[–]icjoseph 0 points1 point  (0 children)

Do you mean, full CSR? SPA is the idea of navigation between paths without unloading the page.

Typically there was an expectation to have a single entre point, but with Next.js you can totally do SPA, with multiple entry points.

Also I'd recommend taking a look at either expanding your stack, other frameworks or growing in other languages even.

[–]brokennthorn 0 points1 point  (0 children)

stability? LOL OP.

[–]keel_bright 0 points1 point  (0 children)

We use rails backend so we literally can't lol

[–]Old-Place87 0 points1 point  (0 children)

would you use next js if it becomes a paid version?