Issue № 1: HTMX at JavaScript Day
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
1cg pull web sockets and server sent events out into extensions 👍 5👎 1
benpate Just say “go” and I’ll volunteer to do it
1cg go
1cg 1.7 we will pull them out
benpate F. What have I done?? 🇫 1😂 1
Carson explains how to make third-party components work with htmx
1cg Ah, OK. So, here’s the deal
1cg and I need to document this, sorry
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.
Fubarrr […] If you want your back button to behave as you expect it to… this pattern of “undoing” all the DOM manipulation your JS widgets did initially on page/fragment load, is critical. […]
https://discordapp.com/channels/725789699527933952/725789747212976259/897967497335148605
Thomas Güttler reminded us about the htmx tag on StackOverflow
guettli I think up to now I am the only one who tries to support new htmx users which ask a question on Stackoverflow. It would be very nice, if some more users could subscribe to the tag htmx, so that you receive an email if a new htmx question got asked: https://stackexchange.com/filters/409974/htmx
Of course I will up-vote your answers 🙂
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
alleho how can you fetch a url that has been built and placed inside a variable?
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.
1cg htmx swoopin’ on livewire on orange site:
1cg [Screenshot: “How Laravel Livewire works”, top comment is about htmx]
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!