HN loves this library but I really don’t get the appeal. It extends HTML with a bunch of attributes with their own syntax:
hx-trigger="keyup changed delay:500ms"
hx-trigger="click[ctrlKey]"
It fires off weird events you’re supposed to hook into with JS:
document.body.addEventListener('htmx:beforeSwap', function(evt) { …
You lose static analysis and gain hard to track down bugs merely from typos
It reminds me of ColdFusion and Angular v1, with its extensions to HTML. HTML was meant for defining content structure, not behavior
Just use plain JS over this if you hate React so much. Or jQuery even. Keep the behavior out of the content layer.