But the point is somewhat moot as modern Internet connections and devices won’t struggle with a 2MB payload in any case.
We’ve come full circle
There is something about the 'use server' declaration that just bothers me. I dunno.
I think most everyone is on go or python for BE work.
Just really frontend focused apps or heavy react shops are doing js on the backend.
EDIT: I think “use server” is a nextjs thing FWIW
https://nextjs.org/docs/app/building-your-application/render...
Personally,I don’t think php or js are the right tools to build a backend for a business.
Neither are particularly friendly towards growing teams for many reasons, but the lack of strong typing is a big one.
You want your backend to have minimal complexity, that’s why go has been so popular lately
Also, to your second point, some of the largest, most critical, and most at-risk businesses on the planet (namely banks) run on COBOL, but I wouldn’t exactly describe cobol as a language that lends itself well to large orgs, it’s just entrenched. same as php and dozens of other technologies.
https://react.dev/blog/2020/12/21/data-fetching-with-react-s...
React v1.0 was out in 2014. It was already being used in production before that.
React Hooks were released in 2019. Hooks has also spent years as part of React with Server Components not being part of it.
Server Components is an extremely new addition to React, and a significant shift in React’s direction.
But don’t take it from me, I’m just regurgitating information I learned from actual React team members (at least at the time) like Dan Abromov.
I wouldn't expect React to be replaced any time soon.
The "old RoR" way assumed that all behavior is built by the server through ruby, until client side behavior was needed. Then, that was built in CoffeeScript. (or JS if you rejected omakase.)
The React way is to assume you will have client side behavior, but write it as if it is client-side and the server will compile that into a html that can be hydrated with behavior without intervention. Even with that "magic," it is easier to reason through if you already have a mental model of the browser.