News for hackers. Stuff that matters.
Re:Htmx is part of the GitHub Accelerator by recursivedoubts on Wednesday August 16, 2023 @11:18AM (#37148416)
we do have a client-side template extension:

https://htmx.org/extensions/client-side-templates/

however, I would encourage most folks to use HTML as the network format: it typically isn't much more CPU to generate the equivalent HTML string that corresponds to a JSON string (sometimes even less, as with tables)

for pure client-side, htmx is largely hands off. We support an `hx-on` attribute to address the fact that HTML doesn't support general `on*` attributes, but that's it

it does, however, emit a large number of events that you can hook into to extend things:

https://htmx.org/reference/#events

And it plays well w/ scripting solutions like Alpine.js or, our our own scripting solution, _hyperscript: https://hyperscript.org

Re:Htmx is part of the GitHub Accelerator by lcnPylGDnU4H9OF on Wednesday August 16, 2023 @12:33PM (#37149605)
Another benefit of using HTML is ease of progressive enhancement. If the default behavior of the server is to render a full HTML page, anyone hitting that URL directly will get the full HTML from the server with no additional back-end work. Additionally, if JS is disabled in the browser, links still work as traditional links.
Re:Htmx is part of the GitHub Accelerator by pragma_x on Thursday August 17, 2023 @09:21AM (#37161154)
Thanks for the thoughtful reply, and the thoughtful architecture.