r/react • u/Obvious_Fennel7602 • 7d ago
General Discussion I think we’ve overcomplicated frontend development — and AI is exposing it
I’ve been building React/Next.js applications for years, and something has been bothering me lately.
A lot of frontend projects are becoming *more* complicated while the actual product is getting simpler.
You’ll see:
\- 10+ state-management patterns
\- multiple data-fetching abstractions
\- enormous component libraries
\- custom hooks wrapping custom hooks
\- “generic” components that nobody wants to touch
\- dozens of folders trying to enforce an architecture
\- AI-generated code adding even more layers
And then a developer gets asked to change a button, modify a form, or add one API field… and suddenly they need to understand half the application.
The irony is that AI coding tools are making this easier to create.
You can ask an AI:
“Build a scalable architecture for this feature.”
And it will happily give you 15 abstractions.
The code looks sophisticated.
The architecture diagram looks impressive.
But six months later, someone has to maintain it.
I’m starting to think the better question isn't:
**“How do we make our frontend architecture more scalable?”**
It’s:
**“How little architecture can we get away with while keeping the product maintainable?”**
For example, I’d rather have:
Feature
├── UI
├── API/data
├── state
└── tests
than create a massive abstraction layer just because we *might* need it someday.
And I’m increasingly applying the same thinking to AI-generated code:
**If I wouldn't ask a human developer to write this abstraction prematurely, I shouldn't ask an AI to write it either.**
Curious what other experienced developers are seeing.
**Has AI made your codebase simpler because you can automate the boring parts — or more complicated because it makes overengineering ridiculously easy?**
I'd particularly like to hear from people maintaining React/Next.js codebases that are 2–5+ years old.
14
u/Mr_Willkins 7d ago
I think this is AI slop
4
u/rileyrgham 7d ago
AI slop the equivalent of meme science.... "I built" : "I studied".... Reality: Zero clue.
2
u/Sweet-Remote-7556 7d ago
yet another ai slop — why?
1
u/gHx4 7d ago edited 7d ago
I've worked on both.
Abstractions are great, they take time to do well, and optimizing them can be hellish. But, without those abstractions, you do a dozen times the work and create a dozen different failure points that all work differently and need their own documentation. So a good architecture balances those needs -- DRY abstraction gives you reliable modification, and KISS gives you some isolation from single points of failure.
What I've noticed that genAI does (and some coworkers also do) is imitate the form of abstractions from other projects in ways that don't efficiently abstract the function of the existing project. Usually the requirements don't match the abstractions used. So you end up with something like a funhouse, where it has parts of houses -- doors, stairs, windows -- but those parts are in completely baffling places. You have to get climbing gear just to sweep the floor, and a wetsuit to fix the furnace. Unless you budget the weeks of rewriting to tear down the walls and build everything for normal usage.
Many real-world feature sets cannot be minimally or optimally solved, but there's usually a few different design patterns that get you 80% of the way to a working solution. The last, hardiest, and messiest 20% is usually making sure the feature is robust, error-tolerant, performant, and doesn't blow up unexpectedly on a Friday evening as the team is clocking out.
Measured in "WTFs per minute", genAI code easily beats many of my previous coworker's. Most coworkers at least seemed to have comprehension of the problem space, even when their code was sloppy. GenAI really doesn't seem to comprehend, it just sorta copy-pastes and remixes from its training set until the code compiles. It's much faster than a coworker, which is great for snippets and scoped drafts, but needs much more review than coworkers because of that lacking comprehension. It's a coin flip whether it saves or loses time, but it's nice having a good rubber duck for rough drafts.