← This Week in HTMX

Issue № 1: HTMX at JavaScript Day

, Deniz Akşimşek

Carson gave a talk on htmx at JetBrains JavaScript Day 2021

In his talk htmx: Writing JavaScript to Avoid Writing JavaScript, Carson delivered a rationale and demonstration of htmx, and obligatory discussion of REST/HATEOAS as usual… to an audience for whom it was quite out of the ordinary. Was he provocative enough to get some JavaScripters curious? We’ll have to see.

💙 to the conference organizers and attendees!

https://youtu.be/R2Q0L9PDHtc?t=15881

Ben Pate committed to refactoring SSE & WebSocket support into plugins

Carson explains how to make third-party components work with htmx

When using a JavaScript library that makes a lot of modifications to the DOM, the modified DOM being saved into history is usually undesirable and can lead to bugs. Carson explains how to avoid it.

In summary, initialize your libraries in htmx.onLoad(), and uninitialize them on the htmx:beforeHistorySave event.

https://discordapp.com/channels/725789699527933952/725789747212976259/897967497335148605

Thomas Güttler reminded us about the htmx tag on StackOverflow

You heard him, folks.

https://stackexchange.com/filters/409974/htmx

_hyperscript adopted the microbundle build system

Don’t worry, _hyperscript will always be available as a single file that you can load from a CDN. However, we can now make ES module builds available as well!

https://github.com/developit/microbundle

URL literals for _hyperscript were considered

This question started a whole discussion that ended with URL literals as a potential new feature. Here’s a peek at how that might look:

set url to https://cors.example.com/api 
append /user?id=${the userId} to url.pathname

fetch url

htmx was brought up in a Hacker News thread about Laravel Livewire

Let me check again… Nope, that’s not LimeWire.

Hacker News is far from a good barometer for the general community of developers (someone tell Paul Graham!) but the attention feels too good to ignore it.

https://news.ycombinator.com/item?id=28850757

💙 to Livewire and the Laravel community!