> it is a small js library ... This means that in theory you don't need js
I assume I'm not the only person left a little puzzled.
Do you mean "don't need JS" as in like, a full-fledged JS framework?
They mean that you don't need to write JS, you can just add a script tag to your page
Sorry I know other people have responded already, but it means you don't have to write any client side javascript at all. You can just skip along with a server that returns html. Just throw the script tag in there, and you're done.
The magic of this is that it's pretty easy to make SPA-like webapps with no javascript or complex client side framework. You can write your server in python, rust, clojure, whatever. If you don't need a lot of state management, it's really simple and awesome.
See the quickstart from htmx.org
When the user clicks the button the browser will take the result of the request to `/clicked` and swap the whole button dom node for whatever the server sent.As a dev you get to write HTML, and need to learn about some new tag attributes.
Your browser is still running js.