htmx 4.0: a Fetch-Based Rewrite, Built-In Morphing Swaps, and Explicit Attribute Inheritance
htmx 4.0 swaps XMLHttpRequest for fetch(), adds idiomorph morphing and hx-partial for multi-target updates, and still lands around 14KB. The migration trap is attribute inheritance: parent attributes now need an :inherited suffix, so an hx-headers carrying your CSRF token quietly stops reaching children and the server starts handing back 403s. There’s an upgrade-check CLI, and it ships under npm’s next tag rather than latest.