Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How does htmx compare with alpinejs (https://alpinejs.dev/)?


HTMX and Alpine pair well together.

Generally, Alpine would handle pure client-side functionality, like toggling classes, expanding a drop-down multi-select, etc.

HTMX for server interactions, fetching, posting updates, etc.

One can accomplish a lot with little to no JS, with the app primarily driven by the backend. Which is quite a benefit if you know and like PHP/Python/Go/Elixir/C++ better than JS. Or just don’t like working in JS.


Alpine is more of a Vue replacement and HTMX is more of a fetch replacement. You can use both, although it’s a little redundant.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: