</> Htmx – The Fetch()ening
6 months ago
- #javascript
- #web-development
- #htmx
- htmx 4.0 will replace htmx 2.0, skipping version 3.0 to keep the author's promise.
- Major changes include replacing XMLHttpRequest with fetch() for AJAX, making attribute inheritance explicit, and simplifying history support.
- New features in htmx 4.0 include streaming responses, Server-Sent Events (SSE) support, and DOM morphing with idiomorph.
- Out-of-band swaps are simplified, introducing <partial> elements for more flexible content management.
- View Transitions will have a queue system to ensure smooth animations, and CSS transitions remain supported.
- Event naming is standardized, and the async model improves performance and predictability.
- hx-on attributes are standardized for light scripting, with improved JavaScript API support.
- The upgrade to htmx 4.0 will require some changes for users, but core functionality remains largely the same.
- Planned release timeline includes an alpha in 2024, beta in 2025, and stable release in 2026.