DEV Community

Cover image for React is Overkill: Why Python + HTMX is Dominating in 2026
Syed Ahmer Shah
Syed Ahmer Shah

Posted on

React is Overkill: Why Python + HTMX is Dominating in 2026

Boilerplate fatigue and performance gains

Last year I spent forty minutes setting up a React project for an internal admin dashboard. Just the boilerplate. Vite config, ESLint setup, Tailwind integration, React Router, TanStack Query because someone on Twitter said it was the right way to handle server state now. I hadn't written a single line of actual application logic yet and I already had twelve files open.

The dashboard needed to list records from a database, let you filter them, and update a status field. Three things. That's it.

I've been thinking about that moment a lot since then. Not because React was wrong exactly, but because the whole experience made me ask a question I probably should've asked earlier: what problem am I actually solving, and does my stack match that problem?


HTMX has been around since 2020, technically. Carson Gross built it on older ideas — intercooler.js, hypermedia, REST as it was supposed to work. But it's only in the last eighteen months or so that it's started showing up seriously in production codebases beyond hobby projects and blog posts. The HTMX GitHub repo crossed 40k stars. The State of JS 2024 survey showed a weird but real pattern: developers were increasingly marking "would not use again" next to React while usage stayed high. People are still using it, but the love is clearly cooling at the edges.

What HTMX actually does is conceptually simple enough to explain in one sentence: it lets HTML elements make HTTP requests and swap parts of the page based on the response. That's it. No virtual DOM, no component lifecycle, no client-side routing, no state management library to argue about. You write hx-get="/search" on an input and hx-trigger="keyup changed delay:300ms" and the results div updates. The HTML is the state. The server renders the HTML. You're done.

For a lot of use cases — the boring ones, the productive ones — that's genuinely enough.


Where Python comes in is almost too natural. Django and FastAPI are both excellent at rendering HTML fragments quickly. Django's template engine is underrated. FastAPI with Jinja2 is fast enough that you genuinely don't need to think about it for most traffic levels a small team will ever hit. You return an HTML fragment from your endpoint, HTMX drops it into the DOM, and the user sees something happen. No JSON serialization, no client-side deserialization, no React re-render cycle. The server does what servers are supposed to do: handle the data, decide what the UI should look like, send it down.

Miguel Grinberg wrote a good piece about this pattern in his Flask-HTMX tutorials and the core insight is something almost boring: web applications were server-rendered for a decade and a half and it worked fine. The SPA era solved real problems — but it also introduced an enormous amount of accidental complexity for cases that didn't need it.


I want to be fair here because the React discourse tends to go off the rails. React is not bad. React is very good at what it was built for. When you need rich client-side interactivity — collaborative editing, complex real-time interfaces, something like Figma or Notion — the component model, unidirectional data flow, and the client-side rendering approach make sense. The ecosystem is genuinely impressive. Next.js solved real deployment problems. React Server Components, once you get past the initial confusion about what they even are, are a real architectural idea worth understanding.

But most applications aren't Figma. Most applications are CRUD with some filtering. Most internal tools are forms, tables, and dashboards. Most freelance projects are e-commerce sites and appointment booking systems. And for all of those, the React stack asks you to carry a lot of weight that delivers nothing to your end users.

The JavaScript fatigue conversation has been happening for a long time — this 2016 post by Jose Aguinaga was funny eight years ago because it was accurate. The irony is it's somehow still accurate in 2026, just with different library names. Bundlers changed. State management evolved from Redux to Zustand to Jotai to whatever came after that. Server components got added to React in a way that made half the existing tutorials wrong. The amount of meta-knowledge required to set up a React project correctly — not even write application logic, just set it up — is genuinely unreasonable for a lot of teams.


Here's where I want to talk about something that doesn't get said enough in these discussions, which is the South Asian developer context specifically.

A lot of the conversation about frontend frameworks happens in the frame of a US/European developer with fast internet, a high-spec machine, and a client who doesn't care about performance as long as it looks modern. That context shapes the defaults. When Vercel or Netlify blog posts talk about bundle sizes and Core Web Vitals, they're often writing for an audience where a 300kb JS bundle is a minor annoyance. In Pakistan — Karachi, Lahore, Hyderabad, smaller cities — that's not a minor annoyance. Users on mobile data in Tier-2 cities are waiting for your SPA to hydrate and it shows.

Freelancers here mostly work on Upwork and Fiverr. A lot of the gigs are admin dashboards for small businesses, HR tools for local companies, basic inventory management systems. The budgets are not large. The timelines are tight. When a Pakistani developer can ship a fully functional admin panel with Django + HTMX in two or three days because there's no API layer to design, no client-side state to manage, no authentication token flow to wire up separately — that is a real, material productivity advantage.

I've talked to a few people doing final year university projects at HITEC, COMSATS, and similar universities around Sindh and Punjab. The React stack honestly overwhelms students who are still figuring out async/await. Watching someone understand HTMX in an afternoon and ship something that works by evening — that's not a small thing. There's something to be said for a technology that removes barriers to entry without sacrificing capability.

The local SaaS mindset here is also different. When someone in Karachi is building their first B2B software product, they're thinking about getting to paying customers fast, not about whether their architecture will scale to ten million users. Python with Django gives you ORM, admin panel, authentication, and a templating system in one package. Adding HTMX on top means you get reactive UI without the separate frontend deployment, the CORS configuration, the API versioning headache. For a solo founder or a two-person team, that simplicity is worth a lot.


The cases where I'd genuinely choose Python + HTMX are becoming clearer to me over time.

Internal tools are the obvious one. Any time a company needs a dashboard that only ten people use, building a full React SPA is an organizational tax, not a feature. The JavaScript bundle has to be maintained, the frontend dev has to know the API contract, someone has to manage the deployment pipeline. With server-rendered HTML and HTMX, it's just one application. One deploy. The developer who built the data model builds the UI. That's not unsophisticated, that's economical.

Small startups at the idea validation stage. If you're not sure whether your product has legs yet, spending three months building a polished React frontend before you talk to users is a bet you probably shouldn't be making. Django + HTMX lets a Python developer ship something users can click through in days. That's not a forever architecture, but it doesn't need to be.

Content-heavy sites with some interactivity. A blog that has a comment section, a search bar, a newsletter signup. HTMX handles those interactions cleanly. You're not pulling in a frontend framework for three interactive elements.

Where it gets harder is when you actually need rich client-side state. An application where the UI is the product — design tools, real-time collaboration, complex data visualization with local filtering and sorting that needs to feel instant. React and its ecosystem are genuinely better there. That's not a grudging admission, it's just accurate.


There's also the team dynamic angle that people underplay. A lot of teams have backend developers who know Python well and frontend skills that are functional but not deep. The React ecosystem requires either genuine frontend expertise or a willingness to do a lot of cargo-culting patterns from Stack Overflow. Server-side rendering with HTMX plays to Python developers' strengths and doesn't require a separate specialist. In markets where fullstack Python devs are easier to find and cheaper to hire than React developers, that matters organizationally.

Adam Johnson's work on Django + HTMX patterns and the HTMX documentation's own essays on hypermedia are worth reading if you want to understand the philosophy here rather than just the mechanics. The argument isn't "SPAs were a mistake." The argument is closer to: the web platform extended HTML to support interactivity through JavaScript, but maybe it should have extended HTML itself instead. HTMX is a bet on that idea. It's a small, focused library — around 14kb unminified — and it's deliberately unambitious in scope. It does one thing and expects HTML and HTTP to do the rest.


I keep coming back to something that's hard to articulate but feels important. There's a certain developer experience that React optimizes for — the experience of a developer inside the component, thinking in terms of state and props and effects. It's a powerful mental model once you internalize it. But it's a mental model you have to fully commit to, and it pulls a lot of complexity in with it.

HTMX optimizes for a different experience — the experience of building something where the server is in control and the browser is just displaying what the server says. That's a much older model. It maps onto how people actually think about data and business logic, which lives on the server. For a lot of developers, particularly those whose real expertise is in data, backend systems, and APIs, that model is more natural and requires less context-switching.

Neither of these is objectively better. They're suited to different problems, different teams, and different moments in a product's life.

What feels true in 2026, though, is that HTMX has earned its place in the conversation as a serious option for production work. It's not a protest against modern tooling. It's not nostalgia for PHP spaghetti. It's a genuine approach to building web interfaces that works well for a specific, large, and underserved category of application. The category that most of us are actually building most of the time.


I rebuilt that admin dashboard eventually. Three days with FastAPI, Jinja2 templates, and HTMX. No build step. No node_modules folder the size of a small country. Every developer on the backend team could read and modify the templates without learning a new paradigm.

It's still running. Nobody has asked me to rewrite it in React.


If you want to dig into the actual mechanics, the HTMX documentation is genuinely well-written and surprisingly short. For the Python side, full-stack-fastapi-template is a good starting point even if you swap out the React frontend for Jinja2. And this talk by Carson Gross at DjangoCon 2022 is the most coherent thirty minutes you'll spend understanding what HTMX is actually trying to do.

Connect With the Author

Platform Link
✍️ Medium @syedahmershah
💬 Dev.to @syedahmershah
🧠 Hashnode @syedahmershah
💻 GitHub @ahmershahdev
🔗 LinkedIn Syed Ahmer Shah
🧭 Beacons Syed Ahmer Shah
🌐 Portfolio ahmershah.dev

Top comments (184)

Collapse
 
lucapu88 profile image
Luca Caputo

React is ALWAYS excessive! The article could have ended there. 🤣
Unfortunately, it's become a horrible trend, and the web has become filled with this library that constantly needs maintenance! You can do more stable and simple things with both Angular and Vue.js, but then people would have had to really study, whereas React can be learned in two days and is easy to use... no one cares if you then live only to maintain the thousands of libraries used to keep a project built with React running!

Collapse
 
tracygjg profile image
Tracy Gilmore

The additional factor is how much REACT code has been fed into coding LLMs and be used to generate more 'applications'. I shudder to think of what might get producted.

I applaud the author's use of HTMX. I have seen it used with Java and Go backends very successfully and think for 99% of CRUD applications (tables and forms) it is more than sufficient. There will be applications that need to support more user interactivity for which HTMX (Alpine-AJAX, etc.) are insufficient. In that can there might be justification for a JS framework but personally I would need convincing.

Collapse
 
syedahmershah profile image
Syed Ahmer Shah

That AI feedback loop is a scary thought—automating complexity rather than solving it.

I’m glad you mentioned Java and Go; it shows the hypermedia approach works everywhere. For 99% of CRUD, the "JS tax" just isn't worth it. I'd also need a lot of convincing to reach for a heavy framework now.

Thread Thread
 
tracygjg profile image
Tracy Gilmore

I have an example of an HTMX-based CRUD application that uses Node/Express backed by a SQLite database.

Thread Thread
 
syedahmershah profile image
Syed Ahmer Shah

That’s a classic, rock-solid stack. I’d love to see how you’re handling the partial updates—are you using a specific templating engine like EJS or Pug to ship those HTML fragments?

Thread Thread
 
tracygjg profile image
Tracy Gilmore

I initially used JS template literals but this makes the backend vulnerable to code injection. I called on handlebars (hbs) through the express-handlebars package for a more robust solution.

Collapse
 
syedahmershah profile image
Syed Ahmer Shah

The dependency hell is real. Moving back to more stable frameworks or even lighter setups feels like a breath of fresh air for long-term maintenance.

Collapse
 
smirk9581 profile image
Ryan John

👍🏼Totally agree with you on React being overkill. I’ve been dealing with this exact pain for years — writing React means constantly babysitting dependencies, memoization, and endless maintenance, just to keep the lights on. That’s actually why I built VuReact: a compiler that lets you write Vue 3 components (cleaner, less boilerplate) and compiles them directly into pure, production-ready React code. No runtime bridges, just maintainable React output. It’s my way of having the best of both worlds without the React maintenance hell.

Collapse
 
syedahmershah profile image
Syed Ahmer Shah

Thanks for the validation, Ali! "Babysitting dependencies and memoization" is the perfect way to describe the React tax.

VuReact sounds like an incredibly smart workaround to that exact pain point—getting the clean DX of Vue while still spitting out standard React. Solving your own maintenance hell by building a compiler is a serious power move. Thanks for sharing that!

Collapse
 
esin87 profile image
Esin Saribudak

I love React and taught it for several years. I had a student at the time who was very excited about HTMX, and I did not get the hype then, but I definitely get it now, especially with how great it is for SEO/AEO. I appreciate you bringing a global perspective to the framework discussion as well.

Collapse
 
syedahmershah profile image
Syed Ahmer Shah

That is awesome to hear, especially coming from someone who taught React! It’s funny how HTMX can seem like a step backward until you actually see it solve modern problems like SEO so elegantly. Thanks for reading, and I really appreciate you noticing the global perspective—it's easy to forget that what works in a Silicon Valley bubble doesn't always apply everywhere else.

Collapse
 
buildbasekit profile image
buildbasekit

React setup in 2026:

install dependencies
install dependencies for dependencies
configure tool to configure another tool
watch npm download the GDP of a small nation

HTMX:
“put hx-get here bro”

Collapse
 
syedahmershah profile image
Syed Ahmer Shah

This made me laugh because it’s painfully accurate 😭

Modern frontend tooling sometimes feels like maintaining an ecosystem just to render a form and a table. HTMX feels refreshing because it brings the focus back to shipping functionality instead of endlessly managing abstraction layers.

Collapse
 
buildbasekit profile image
buildbasekit

Honestly this is why backend devs stay suspicious of frontend tooling 😄

React: “we just need a simple form”
Also React: adds 14 packages, 3 configs, and a philosophical debate about state management

HTMX: “server sends HTML, browser shows HTML”
Frontend complexity immediately evaporates like a Spring Boot startup log after you ignore it for 2 seconds

Collapse
 
gito3 profile image
Chris Greg

Install dependencies for dependencies
you took me out with that one 😆

Collapse
 
syedahmershah profile image
Syed Ahmer Shah

Haha, glad you caught that!

Collapse
 
dannyengelman profile image
Danny Engelman • Edited

One can not compare HTMX with Web Components

HTMX is a DOM-enhancement library, Web Components create DOM

  • HTMX is like good old jQuery, it has to wait till all HTML has parsed into DOM, then it can query for hx- attributes and transform DOM into some other DOM, or do something HTMX-else
  • Web Components create DOM, so there is no wait till DOM was parsed. While parsing HTML, any* <tag-name> encoutered will become a Custom Element, creation not transformation

That also means with Web Components you can set
el.innerHTML = "<my-button></my-button>";
anytime you want, and the DOM element will automagically upgrade,
and do its Custom Element thing.
Because Web Components are baked into the Browser.

With HTMX you can set
el.innerhtml = "<button hx-post="/clicked" hx-swap="outerHTML">Click Me</button>"
... and nothing will happen
the HTMX developer has to execute: htmx.process(el) after HTML was parsed to DOM

HTMX is a DOM-enhancement library, Web Components create DOM


* Yes, (since 2016) any <tag-name> (without using JavaScript) becomes a valid Custom Element/HTMLElement, great for layout an styling, no more DIV-soup. JavaScript adds more functionality to the Web Component (and everybody mixes the terms Custom Element/Web Component)
  • <tag-name> is a UNdefined Custom Element (but valid HTMLElement!)
  • customElements.define("tag-name") makes it a defined Custom Element
Collapse
 
syedahmershah profile image
Syed Ahmer Shah

While you make a fair point about how they handle DOM lifecycle and initialization under the hood, comparing HTMX and Web Components is still common because developers often choose between them to solve the same high-level problem: building dynamic user interfaces without a heavy SPA framework. They aren't mutually exclusive, but they represent different architectural philosophies for the modern web.

Also, your comment reads like it was generated by an AI.

Collapse
 
dannyengelman profile image
Danny Engelman • Edited

Also, your comment reads like it was generated by an AI.

Thank you, I will consider that a compliment. The text is an extract from the Web Components site I am building. And yes, I do use AI to correct my English, I am not a native speaker/writer.

comparing HTMX and Web Components is still common because developers often choose between them to solve the same high-level problem.

Then make it a fair comparison.

  • HTMX waits till everyone is in the room, that is a 56 KB download, then the music starts playing.
  • Web Components are baked into the brower, music is already playing, and everyone is welcome to the party

HTMX is declarative (percieved as easier) and a lot of sugar.. its a 56KB gzipped download for a reason.

One of the HTMX sugar cubes is hx-get="file.html"

Web Components that do more than just presentation need JavaScript,
a HTML (or any file) import <load-file src="file.html"> is 7 lines of code:

Of course you can get cheeky and rename load-file to hx-get

Collapse
 
aadswebdesign profile image
Aad Pouw

I fully agree,
Just as web components are objects too and then using 'innerHTML' ?
Better use 'append / appendChild' and inject the DOM directly!
The OOP way!

Collapse
 
syedahmershah profile image
Syed Ahmer Shah

Yeah, that’s a good point — direct DOM manipulation with append/appendChild is way cleaner and safer than innerHTML in most cases.

Collapse
 
dannyengelman profile image
Danny Engelman • Edited

appendChild is oldskool Internet Explorer syntax, and used by almost every AI answer, because AI is 'trained' on old content.

append did not exist in IE, and is way more powerful

HTML — Hyper Tangled Messy Lines

Power to the DOM!

constructor(){
  // yes, you can use JS before the super() call, MDN documentation is wrong
  const createElement = (tag, props = {}) => Object.assign(document.createElement(tag), props);
  super() // sets AND returns 'this' scope
    .attachShadow({mode: 'open'}) // sets AND returns this.shadowRoot
    .append( 
        createElement('style',{ 
           textContent: `...` 
        }),
        createElement('button', {
           textContent: `click me!`,
           onclick: function() { // use arrow function if you want 'this' to be the component
              this.textContent = 'Clicked!';
            }
        })
    );
}
Enter fullscreen mode Exit fullscreen mode

appendChild (returns the created Element) never required because createElement returns the DOM element.

Thread Thread
 
aadswebdesign profile image
Aad Pouw

First I just learned something from your example and thanks for that.
Also, for the style element it is not really needed but if you want to reuse elements you have to add createElement.cloneNode(true);

Thread Thread
 
dannyengelman profile image
Danny Engelman • Edited

use constructed/adopted Stylesheets for cloning StyleSheets.

developer.mozilla.org/en-US/docs/W...

technically my code doesn't need cloneNode; as createElement processes a CSS text string with textContent

-- Danny, nog niet gepensioneerd

Collapse
 
sahilkumar profile image
Sahil Kumar

The point about South Asian network conditions is a huge wake-up call. We often develop on fiber and M2 chips, forgetting that a 2MB bundle is a massive barrier for someone on a spotty 3G connection in a Tier-2 city. HTMX isn't just a trend; it’s an accessibility win.

Collapse
 
syedahmershah profile image
Syed Ahmer Shah

Exactly. Building for the real world means optimizing for low bandwidth. HTMX levels the playing field for users on spotty connections.

Collapse
 
rock_zhu_9c3f8b6962f30378 profile image
rock zhu

nice

Thread Thread
 
syedahmershah profile image
Syed Ahmer Shah

thankyou

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Every so often I end up looking at HTMX and always come away from it concluding that it's 90% perfect, but not quite.

I like many aspects of it, but always just seems a bit too inflexible for the things I tend to need.

Still, I really agree with the point that a simple library is often enough. It doesn't always have to be a full framework; sometimes a micro-framework or even a simple helper library is enough.

I'm not quite at the point of warming up to jquery again but some days I feel like I'm slowly getting to that point 🤭

Collapse
 
syedahmershah profile image
Syed Ahmer Shah

HTMX is definitely about finding the right tool for the job. It handles 90% of web needs, but for that last 10% of heavy UI, frameworks still rule.

Collapse
 
tracygjg profile image
Tracy Gilmore

Your opinion is absolutely valid. To be fair to HTMX, it is only a library so is not a 'one size fits all' solution. I found it quite adequate for CRUD applications. Sometimes a sprinkling of Alpine and few native web components can improved usability, but for anything requiring more user interactivity a JS framework might be the best answer. Of course there are other factors to consider such as the maturity and skills of the team as a whole but it is not a bad starting point.

Collapse
 
syedahmershah profile image
Syed Ahmer Shah

Combining HTMX with Alpine or Web Components is a great middle ground. It keeps things modular without the full weight of a heavy SPA.

Collapse
 
itskondrat profile image
Mykola Kondratiuk

fair on the boilerplate pain but most of that's the ecosystem choices, not react. next.js defaults would've had that dashboard up in 15min. htmx wins when your server's already rendering - internal tools usually are.

Collapse
 
syedahmershah profile image
Syed Ahmer Shah

Fair point on Next.js setup speed. But for CRUD and internal tools, I’d rather avoid the hydration and state sync dance entirely. HTMX just fits.

Collapse
 
itskondrat profile image
Mykola Kondratiuk

yeah the hydration dance for read-heavy tools just doesn't make sense. i shipped an internal dashboard with HTMX last quarter and the team says it's the easiest thing to modify in the whole repo.

Collapse
 
musabsheikh profile image
Faraz

The boilerplate fatigue is real. I’ve spent way too many hours setting up Vite, ESLint, and state management for projects that just needed a simple table. HTMX feels like a return to sanity where you actually focus on the logic rather than the plumbing. It is refreshing to see someone call out the "Vite config" nightmare.

Collapse
 
syedahmershah profile image
Syed Ahmer Shah

You nailed it. The "plumbing" has become a full-time job lately. It is liberating to just write logic again without fighting a bundler for forty minutes first.

Collapse
 
syedahmershah profile image
Syed Ahmer Shah

Sanity is the right word. Spending hours on Vite configs for a simple CRUD app is exhausting. It is great to get back to pure logic.

Collapse
 
syedfarzeenshahofficial profile image
Vinod Oad

Performance is where this stack really wins. Achieving a 100/100 Lighthouse score with a heavy SPA is a nightmare of optimization. With server-rendered fragments, the site is snappy by default. That is a massive win for technical SEO and user experience without needing a PhD in bundle splitting.

Collapse
 
syedahmershah profile image
Syed Ahmer Shah

Exactly. Starting with high performance by default is much easier than trying to optimize a bloated SPA after the fact. HTMX makes that "snappiness" feel effortless.

Collapse
 
syedasharshah profile image
Vicky Jaish

I felt that "twelve files open before a single line of logic" comment in my soul. The cognitive load of modern React (Zustand, Query, Router, etc.) is becoming a tax that many small projects simply shouldn't have to pay.

Collapse
 
syedahmershah profile image
Syed Ahmer Shah

The overhead is real. For many projects, that "tax" yields zero ROI. HTMX lets you focus on the product instead of the plumbing.

Some comments may only be visible to logged-in visitors. Sign in to view all comments. Some comments have been hidden by the post's author - find out more