A modest critique of Htmx

Attribute inheritance & configuration

  • Several commenters agree inheritance of hx-* attributes can cause confusing bugs, especially with template engines; many recommend disabling it globally.
  • Others note it’s configurable (disableInheritance) but concede that the default has “bitten” people.

Request queuing & cancellation

  • There is confusion over the default queuing behavior; some think in‑flight requests are canceled, others clarify only queued-but-not-started requests are dropped, and the current one is allowed to finish.
  • Some argue canceling older requests is correct for idempotent GETs (e.g., rapidly updated inputs), while others prefer ordered processing to avoid “lost work.”
  • Overall, queuing semantics are seen as subtle and hard to reason about in complex UIs.

DOM morphing & browser limitations

  • Preserving client-side state during swaps (inputs, <details>, etc.) is a known problem with morphdom-style algorithms.
  • Commenters point to new browser APIs like moveBefore() as promising for better state preservation; htmx already experiments with this in bleeding-edge browsers.

State management: DOM vs client vs server

  • Recurrent tension: htmx works best when the server is the source of truth and local state is minimal.
  • Some find DOM/URL-based state natural and desirable; others view deeply nested form names and data-* attributes as awkward.
  • Critics highlight pain around preserving local UI state (collapsed panels, dynamic form rows) across swaps compared with SPAs.

Scope of htmx: simple vs complex UIs

  • Many praise htmx for small to medium interactivity, admin tools, and CRUD-heavy apps; it “feels like jQuery” but more HTML-centric.
  • Several caution against using it for highly dynamic, event-heavy UIs; beyond a certain complexity, SPA-style approaches may be saner.

Ecosystem & interoperability

  • htmx is framed as one tool on an “interactivity spectrum,” not a React replacement; pairing with Alpine or other JS for local state is common.
  • Mixing htmx with React is considered problematic due to React’s virtual DOM and synthetic events; better fit with libraries using real DOM events.

Experiences, alternatives & skepticism

  • Some report large, performant production systems with htmx-like patterns and praise the lack of build tooling.
  • Others fear “spaghetti HTML” and hard-to-test code when data modeling, HTML, and behavior are tightly coupled.
  • Related tools mentioned: Hotwire/Turbo, Unpoly, Phoenix LiveView, and server-first paradigms in general.