News for hackers. Stuff that matters.
Re:React Won by Default – and It's Killing Front End Innovation by mike_hearn on Tuesday September 16, 2025 @04:11AM (#45259457)
That way of using it is so different to how you're supposed to use that it might as well not be React at all. It was designed as an in-browser framework and is poorly designed for server-side template rendering.
Re:React Won by Default – and It's Killing Front End Innovation by whoknowsidont on Tuesday September 16, 2025 @10:18AM (#45262584)
React has always done SSR first and then hydrated state on the client. What leads you to believe that this is not how you're supposed to use it? Doing pure SSR with React is simply... do not hyrdrate state on the client.

Really really straightforward.

This is such a vanilla setup and was kind of the big selling point to start with from the get-go?

Why do you claim otherwise?

Re:React Won by Default – and It's Killing Front End Innovation by sbergot on Tuesday September 16, 2025 @11:59AM (#45264030)
This is factully wrong. You are confusing react with nextjs. React produce html documents, and the first usecase was reactdom, a pure client rendering library.
Re:React Won by Default – and It's Killing Front End Innovation by whoknowsidont on Tuesday September 16, 2025 @12:22PM (#45264338)
No. I'm speaking from experience having used React from its very first release. You're not only factually wrong about me being wrong, your knowledge is obviously quite limited.

React has always initially rendering components on the server, then hydrated on the client. You don't have to take my word for it, download the initial release and try it out yourself: https://github.com/facebook/react/releases/tag/v0.4.0

Go ahead, run that and write a simple app. Even better, want to do full SSR with no client lifecycle? Write an app that uses "React.renderComponentToString" and then describe what's happening for me.

Even .NET had solutions around using React just for SSR: https://reactjs.net/features/server-side-rendering.html

Claiming that react itself could not just render out a component server-side and spit out the HTML to the client requires several critical misconceptions about how software in general works lol.

Re:React Won by Default – and It's Killing Front End Innovation by skowron on Wednesday September 17, 2025 @12:10AM (#45271576)
Aren't you a treasure, thank the gods you're here to condescend us plebs.
Re:React Won by Default – and It's Killing Front End Innovation by whoknowsidont on Wednesday September 17, 2025 @11:32AM (#45277070)
Claiming something is objectively wrong while stating something that can be refuted with 10 seconds of Googling means you're massaging your own ego at the expense of everyone else's time.

Grow up.

Re:React Won by Default – and It's Killing Front End Innovation by skowron on Monday September 22, 2025 @05:11PM (#45339487)
You're still condescending. It's unbecoming.
Re:React Won by Default – and It's Killing Front End Innovation by mike_hearn on Friday September 26, 2025 @04:36AM (#45384215)
I didn't know that, thanks for the pointer, but ReactJS did start as a client side only framework.

React's history starts around 2010 or so, it was integrated into Facebook in 2011 and Instagram 2012 before being open sourced in 2013. And it was that first open source release that added renderComponentToString: long after React had been deployed on some of the world's largest websites.

Also, renderComponentToString isn't SSR. That term usually implies client side hydration so event handlers work, as React is all about state management. But in that release there is no mention of hydration. You could of course do it by hand by rendering to HTML server side, then replacing the entire DOM with a new client side rendered version yourself if you don't mind wiping user's state in some cases, which of course people do! For SSR to work properly took longer.

And that makes sense. Facebook don't use JS on the server side, at least not in that era, their web servers were all PHP/hack. So what would have done the SSR?

Re:React Won by Default – and It's Killing Front End Innovation by rafark on Friday September 26, 2025 @12:25PM (#45388273)
Just as a fun fact, React’s jsx is actually a port of XHP which was initially developed for PHP in 2009 I believe. This would explain why react’s components were class based at first (because php leans heavily towards class based OO programming).