| Htmx 4.0(four.htmx.org) | |
| 815 points by rmsaksida 13 days ago | 229 comments | |
tl;dr: htmx 4.0 ships after 8 months of work, with internals migrated from XMLHttpRequest to fetch(). Breaking changes include explicit attribute inheritance (via `:inherited` suffix), standardized event names (e.g., `htmx:before:request`), and history navigation via re-fetching instead of localStorage snapshots. New features include built-in morph swaps (idiomorph), an `<hx-partial>` tag for multi-target updates, streaming extensions (SSE, WebSockets, multipart), and `hx-live` for front-end scripting. A CLI upgrade tool is provided; htmx 2 remains the NPM `latest` tag until 2027. | |
HN Discussion:
| |