Post

If AI is writing software from now on, to any meaningful degree, React should be absolutely dead. The *only* benefit of React was that most human engineers already knew it. It's the worst choice in literally every other way. If humans aren't writing your code, your code shouldn't be in React.

4 reposts47 likes

I was prototyping something with Opus in Bun/Electrobun/SQLite recently and paid no attention to what else it used. I was getting really good results both in terms of the model taking my design feedback and the app’s overall performance. Had a chuckle when I found it had no React.

Think about it: React is the worst modern framework in terms of performance. Its only benefit was the ecosystem size; it's the default choice. You can always find what you need, and you can always hire for it. But if AI is writing the code anyway, those benefits fly out the window.

If you're just thinking, "but *I* need to read the code," then: 1. Your belief in the capability of AI seems a little sus; and 2. Your abilities as a developer seem pretty sus to me too, TBH. You're telling me you can't learn a new framework *even when a machine's doing all your other work*?

It's actually interesting to think about how far you'd go down this road. Why use a framework at all? Why not use web components? Or vanilla JS? If your concern before was readability and maintainability, why doesn't your opinion change when you're not the one doing the reasoning and maintenance?

I like this framing React solved some problems when it was created, the web environment evolved since that time and solves them natively. But people got used to React, it has good (great) docs and tutorials... For some years it feels like inertia is keeping people tied to it, not its benefits.

Of course, some people just don't think AI is that capable in the first place, and that's fine. I'm just talking about the people who really think humans writing code is over. If that's the case: why aren't you optimizing for performance? Why use the worst framework when everything costs the same?

Let me tell you *most* AI engineers already know React. Because there's so much React code out there AI is better at generating React than a lot of other frameworks. Also you're not accounting for eco-system, and dev tooling both of which were always the compelling reasons to adopt React.

It may have once been true that AI was "better" at React, but I don't think it is anymore. Ecosystem doesn't matter if AI is writing the code. And on dev tooling: if anything, other frameworks have always been ahead, not behind. (React *just* got a compiler, which other fws have had for ages!)

In all the years I've been using multiple frameworks, I've never heard of/seen a dev tooling gap between other frameworks and React—especially not in React's favor. If anything, others have always been able to move much faster in that regard. I wonder if maybe you haven't spent much time with them.

There are also diminishing returns. Much of the React LLMs produce is of very low quality, because it is trained on a lot of very bad code. This isn’t true of everything.

I agree and I haven't touched React since 2018 or so... But when companies bet on a stack there are other factors like funding, maturity, and longevity. The fact that Meta dogfoods React with billions of users is an argument I've heard many times.

I find all of those arguments lazy, personally (if not downright negligent). I'd get it if the alternatives were extremely new, but they're all well funded. They're all plenty mature. They've all been around for a very long time now, and they're all used at massive scale.

Actually I'd go so far as to say none of the serious alternatives to React are even "bets" at this point. There's no real risk at all in Vue, Svelte, Astro, or plenty of others. Any of these going belly-up and forcing you to migrate is infinitely less likely than React causing perf problems.

I totally agree with you. Only saying that the decision process is often not technical. And in cutthroat environments you hear stuff like: "Not my fault it was a bad decision! That's what everyone else is using!"