cd /news/large-language-models/why-ai-hates-modern-frameworks-and-l… Β· home β€Ί topics β€Ί large-language-models β€Ί article
[ARTICLE Β· art-44806] src=dev.to β†— pub= topic=large-language-models verified=true sentiment=Β· neutral

Why AI Hates Modern Frameworks (and Loves Web Standards)

A developer argues that modern JavaScript frameworks like Angular and React impose a token cost on large language models (LLMs) when generating code, making simpler, standards-based architectures more efficient. The post highlights that frameworks optimized for human coordination create friction for AI, which processes code token by token, increasing latency and cost. The author advocates for flat architectures built on web standards, such as the Inglorious Web approach, to reduce generative context and improve AI performance.

read7 min views1 publishedJun 30, 2026

There's a paradox nobody wants to say out loud: the same frameworks companies pick because they're "enterprise-ready," "scalable," and "industry standard" are, for an LLM writing code, a minefield.

Angular, React with its whole ecosystem, Nx with its monorepos: these are powerful tools, built by humans to coordinate teams of humans on massive codebases. And for that purpose, they're often the right choice β€” if your primary constraint is coordinating hundreds of engineers over a decade, the conventions and tooling of an established framework earn their keep.

But there's a second actor in the room now. When the one writing the code is an AI, the very traits that make these frameworks "robust" turn into pure friction. The argument I'm making isn't "Angular and React are obsolete." It's narrower: we've historically optimized software architecture for human cognition, and LLMs introduce a different cost model that may favor simpler, more deterministic architectures β€” at least in some domains. Let's break down why, in three points.

An LLM doesn't "understand" code the way we do β€” it processes it token by token, and every token costs something: money, latency, and context window that could otherwise be spent reasoning about the actual problem.

Try asking an AI to generate a simple input form in a typical Angular/Nx context. To do it "properly" it has to:

.ts

, .html

, .css

files)@Component

with all its metadataNgModule

or a standalone-components configapps/

, libs/

, feature-x/

, data-access/

, ui/

...)All of this before writing a single line of actual logic. That's architectural complexity that, for a human, pays for itself over time thanks to tooling, autocomplete, and internalized conventions. For an LLM generating text sequentially, it's a tax paid on every single request.

My thesis: modern architectural complexity isn't just a cognitive cost for developers β€” it's a direct economic and latency tax on AI. More files, more boilerplate, more layers of indirection means more tokens, which means more time and more cost for every single generative interaction. Yes, context windows are growing and agents are getting smarter at navigating large repositories. But fewer tokens is still fewer tokens, at any scale β€” cheaper and faster doesn't stop being an advantage just because the baseline improves.

The alternative is a flat architecture, built on native web standards, where logic is deterministic and localized. In Inglorious Web, for instance, a component is an object with handlers and a render

function:

const ContactForm = {
  render(entity, api) {
    return html`
      <input @input=${(e) => api.notify("#contactForm:fieldChange", {
        path: "email", value: e.target.value
      })} />
    `
  },
}

No decorators, no modules to register, no folders to traverse. One file, one unit of meaning. For an LLM, that translates into a drastically smaller generative context β€” and in practice, a near-instant response instead of a whole reasoning pass spent figuring out where and how each piece fits.

"But what about Svelte or Solid?" β€” fair question, and the one a skeptical reader is probably already forming. Yes, both are lighter than Angular or React. But they don't fully solve the problem, for one fundamental reason: they both require a build step. Svelte compiles its template syntax into vanilla JavaScript before anything reaches the browser. Yes, human developers also reason about Svelte semantics rather than generated output β€” but they rely on compiler guarantees that have been tested and documented over time. An LLM has fewer opportunities to verify that the source it generates behaves as intended once that transformation step is applied. It introduces another semantic layer between what the model writes and what the runtime ultimately executes. SolidJS is closer to the metal, but its fine-grained reactivity β€” signals that automatically track dependencies at runtime β€” introduces a different kind of

The more speculative code a codebase has β€” patterns added "just in case," preemptive abstraction layers, optional configurations β€” the more surface area an LLM has to get confused on.

If an AI has to navigate Signals, RxJS, a couple of custom stores, and maybe a different state-management library per feature (the jungle you've probably already run into in some Angular or React project that grew badly), it has more opportunities to hallucinate. It'll invent a method that doesn't exist, mix two incompatible patterns, break the app on the first refactor because it "guessed" a convention that wasn't actually the one the project used.

Generative AI excels when working close to platform-native abstractions: HTML, CSS, modern JavaScript. That's where it has seen the most examples, the most consistency, the least variance from one project to another. Every architectural "house of cards" we build on top of the native platform is one more dialect the model has to learn to recognize β€” and statistically, one it will get wrong more often.

A framework with a single state pattern (everything lives in the entity, never in component closures) and a single rule for changing it (api.notify()

, always) eliminates entire branches of ambiguity. There's no choosing between useState

, a signal, or a Redux selector: there's one way, always the same way. Fewer arbitrary choices to make means fewer chances to get it wrong.

And when something does go wrong β€” because it will β€” you're not left debugging magic. Inglorious Web is built on the three core principles of Redux (single source of truth, read-only state, changes through pure functions) and is fully compatible with Redux DevTools. This means you get time-travel debugging out of the box: you can replay every state transition, inspect exactly what changed and when, and pinpoint the moment the AI-generated code produced an unexpected result. The same determinism that makes the architecture legible to an LLM makes it legible to a developer with DevTools open. If you want to go deeper on this, I've covered the Redux principles and how Inglorious Web applies them in earlier articles β€” but the short version is: predictable state flow is a property that benefits both the model generating code and the human debugging it afterward.

I'm not going to claim that the 400-screen enterprise app is dead, or that users are about to stop wanting the button to always be in the same place. Consistency, auditability, accessibility β€” these are real constraints that keep pre-built UIs relevant, especially in regulated industries. Generative UI may never become the dominant paradigm, and it would be naive to predict otherwise.

But here's the thing: it doesn't need to be dominant to expose a genuine limitation in today's frameworks.

There are already real use cases where generating UI components on demand makes sense β€” data exploration tools, internal dashboards, custom reports. In these contexts, an AI receives a dataset and produces the visual layer needed to interact with it, just for that moment. Niche? Probably, yes. Nonexistent? Absolutely not.

And for this to work at all β€” even in a narrow niche β€” the rendering has to be fast. To be fair, both React and Angular have evolved significantly here: server components, partial hydration, and streaming have addressed many of the performance complaints that were valid a few years ago. But even in their modern form, they carry runtime overhead and initialization costs that are hard to shed entirely β€” because they were designed for complex, stateful applications, not for components assembled on the fly and discarded moments later.

What on-demand UI requires is a rendering engine with no intermediate compilers and no heavy runtime to initialize: re-render the whole tree on every state change and let a library like lit-html handle template reconciliation β€” efficiently updating only the DOM nodes that actually changed, without a virtual DOM layer in between. No zone.js to wake up, no signal graph to trace. Just: state changes β†’ re-render β†’ the browser applies the diff.

Whether this pattern will expand beyond its current niche is genuinely unknown. But the frameworks that make it technically impossible aren't even in the conversation.

I'm not going to tell you "so go use my framework." But there's one thought I want to leave you with.

When I designed Inglorious Web, I did it to get back to the simplicity of web standards. Today I realize that same simplicity isn't just there to keep us humans sane β€” it's the only way to let AI generate interfaces that are fast, cheap, and stable.

The software of the future may end up looking surprisingly lightweight β€” not because humans demanded it, but because LLMs reward it.

── more in #large-language-models 4 stories Β· sorted by recency
── more on @angular 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/why-ai-hates-modern-…] indexed:0 read:7min 2026-06-30 Β· β€”