I just don't understand React, it makes things slower, less responsive, just a worse browsing experience in general all to serve json instead of html. The user experience is worse and the developer experience is worse.
React was invented to save facebook money on the billions of requests they get by sending minimal json data and having JavaScript do all the rendering. Under facebook I can understand it because it will save them millions in bandwidth but for 99.99999% of other websites it makes no sense.
Also another reason for React was to devalue front-end developers and make them easier to replace.
It's not about the rendering. It's about making sure all the state of the UI is consistent. That when textbox A is changed. All the places in the page that depend on that value are updated. You can do it without react but it's a real pain.
Apparently Facebook can't do it with React either. They still experience the exact same state inconsistency bug as described [0] during React announcement as rationale for using React.
Managing state in the frontend is the worst, no matter the framework.
I understand why a large company like Facebook wants it to be done client side, but for the rest of us, I'd argue its nowhere near worth the hassle.
Yes, the problem isn't react, it's the notion that every website needs to be an application, or that sites serving articles (a large part of the web) need a UI.
I make dynamic apps and I have never had this issue with state. I've made visualization generators, image editors, live charts and html editors that run in the browser. the stuff I'm making has a lot changing elements and handling the state is not an issue for me. Maybe it's because I learned programming from game development I see web dev with a different perspective?
So 10 years ago when React was made public the default way to handle changes on the web was to have a bunch of event handlers that would go over the DOM and make appropriate mutations.
That's kind of typical of retained mode user interfaces. To this day that's kind of how things like QT and GTK kind of work. There are things like data binding, etc. But that's what they do under the hood.
When you are working like that it's easy to forget to do mutations on specific UI components or to make mistakes about the mutation that has to happen.
React handles the mutations, it takes your code, feeds it the current state and gets back what the ui should look like, and then it does a diff with what's on screen and updates accordingly.
If you are coming from game development you are probably used to immediate mode UIs where you specify and update the entire user interface every time.
To slightly refine your question. When a variable changes how do you know which UI elements have to be updated? I think his answer is obviously all of them.
This! There is also an entire generation of management gatekeepers that only approve of React stacks, because the population of React devs is so huge they step over one another for a job.
I have a moderately complex web application, lot's of heavy compute in the backend, in which I wrote a perfectly fine browser based vanilla JavaScript UI that is performant and does everything the application needs. However, ordinary users see it and say "it looks so old, like early web" and they literally don't want to be seen using "such old looking software". Their reason for rejection is a fashion argument, they think it makes them look old using it.
Okay, so I go looking for a front end developer to make my vanilla js look more modern, and I can't afford anybody except 3rd world React developers, who work amazingly fast and build my UI as fast as I can tell them what I need. The front end code is now 2-3 times larger than the backend, the UI looks just like all the other single page applications, and my new beta users are finally treating the project like this is viable new software and not some franken-monster of old and new. I actually receive useful feedback now, rather than complains that it "looks so old".
I honestly think the real problem is that we have a whole generation of web devs that really only know react.