:: krowemoh

Saturday | 19 APR 2025
Posts Links Other About Now

previous
next

Thoughts on htmx

2025-02-27

The idea of htmx is to use html markup as the data format. Instead of passing JSON around and then having to parse and process that JSON for display, the server can send the markup so the browser can just display it.

This is an interesting proposition and one that makes sense to me. I have it a shot to use htmx to build a note taking app but I quickly realized that it was too big of a mental shift to use hypertext as the data format. It's simpler than a SPA in theory but after using sveltekit and json apis, I found restructuring my code to send partial templates to be difficult.

This is probably something that would go away with time but I'm not invested enough in htmx to switch to using it. It also doesn't help that my own server side framework isn't ergonomic enough to be used for htmx. It's fine for building straight JSON apis but building out markup is a bit more cumbersome than I would like.

I'm glad I tried to do something real with htmx as it is a cool idea and one that makes web dev simpler. However I think SPA and javascript are easy enough for me to pick up that I would rather be lazy and use something I already know.