logoalt Hacker News

asimlast Thursday at 3:11 PM4 repliesview on HN

Man I did try htmx, and I was hopeful, right until I saw how it polluted my codebase. I can't say I have the answers, but writing a pure Go app, I'm currently using one giant css file, custom styling and inline html.

And now I'm at the breaking point. So I'm planning to move to tailwind and Go templates, but honestly, i was hopeful for htmx, so I need to properly see the usecase. Which i don't know is this. It reminds me of Angular a lot...


Replies

kitdlast Thursday at 3:29 PM

This is the thing. Htmx is great if you only consider the frontend. But it does require fixing up the backed to match. A framework like that needs to integrate the front & back ends fairly tightly to have good UX. You may be interested in Datastar which does this better IMHO

https://data-star.dev/

show 2 replies
yxhuvudlast Thursday at 3:20 PM

Turbo with a small sprinkling of stimulus may be closer to what you are hoping for - turbo especially is a lot more opinionated than htmx.

elevationlast Thursday at 3:56 PM

> it polluted my codebase

HTMX is less noisy if you integrate it into your backend framework.

A contact of mine build a python/flask app. To simplify coding, he wrote a file to extend the flask framework to support the HTMX patterns he needed with just a single line of boilerplate. Took him about a day, his team is happy with the results.

show 1 reply
benji-yorklast Thursday at 3:31 PM

> polluted my codebase

I'd love to hear more about that.

show 1 reply