Top
Best
New

Posted by iNic 12/18/2025

Please just try HTMX(pleasejusttryhtmx.com)
616 points | 515 commentspage 12
boredumb 12/18/2025|
please, just use html/css and some javascript where applicable.
adamzwasserman 12/18/2025||
Even if you do have complex client-side state: dataos.software
ndr 12/18/2025||
If you never seen HTMX it is a small js library that lets you swap some part of your dom with the responses from your webserver.

This means that in theory you (as a dev) don't need (to write any) js, nor do your users need to download a full page (for any interaction) like it's 1999. Your webserver replies with fully server-renderd HTML but just for the dom node (say a div) that you want to replace.

It's fun for very simple things, even great for extremely simple interactions modes. For interactive products, anything beyond simple CRUDs, it's madness.

Whenever you want to sprinkle a tiny bit of interactivity you'll have to choose between the path of least resistance (a small hack on HTMX) or a proper way. State management gets out of control real fast, it's the opposite of UI=f(state).

I've seen it go bad, then worse with alpine-js, and then completely ripped in favor of something where people can let the browser do browser things.

[edit for clarity]

rkomorn 12/18/2025||
> 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?

ndr 12/18/2025|||
See the quickstart from htmx.org

    <script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.8/dist/htmx.min.js"></script>
      <!-- have a button POST a click via AJAX -->
      <button hx-post="/clicked" hx-swap="outerHTML">
        Click Me
      </button>

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.

lunar_mycroft 12/18/2025||||
They mean that you don't need to write JS, you can just add a script tag to your page
chamomeal 12/18/2025|||
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.

bmacho 12/18/2025||
> If you never seen HTMX it is a small js library that lets you swap some part of your dom with the responses from your webserver.

> This means that in theory you don't need js, nor do your users need to download a full page like it's 1999. Your webserver replies with fully server-renderd HTML but just for the dom node (say a div) that you want to replace.

You got this backwards. With HTMX you need js. But just to swap a div, you can use link target + iframe, like it's 1999.

ndr 12/18/2025||
You [as a dev] don't need [to write] js.

Your browser will still run js. See sibling thread.

srfrog 12/18/2025||
I'm the CEO of HTML. I approve of unpoly. A+++++
tantalor 12/18/2025||
The author has never heard of jQuery
bjord 12/18/2025||
please just try TLS
littlecranky67 12/18/2025||
Can we see a styled date-time picker in htmx?
yawaramin 12/18/2025|
Yeah, https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...
littlecranky67 12/19/2025|||
I can tell you, it is neither styled, nor does it work on Firefox (as in, properly works). And the mobile UX is horrible.
yawaramin 12/19/2025||
Perhaps Firefox should focus on shipping a good native datepicker instead of trying to put AI in the browser.
littlecranky67 12/20/2025||
True, but completely unrelated to the original thread and issue at hand.
yawaramin 12/21/2025||
This should be the issue at hand. Browsers shipping unfinished, sub-standard UI widgets should be a bigger concern for everybody than the random Joe Framework of the week not re-implementing the same widgets.
adamzwasserman 12/18/2025|||
took the words out of my mouth!
dana321 12/18/2025||
_another fucking framework_
robinhood 12/18/2025|
Yet another thread of React vs the rest of the world. Each has its use case, and most of the time, React/Vue are largely overkill. Personally, I would never, ever, ever start another React project again. The nightmare of the horrible JS ecosystem, build steps and tooling is behind me. All my projects now use either HTMX or Alpine Ajax - and for web apps that are actually pretty large. It works perfectly fine. Add Turbo to the mix and you almost have the feeling of using a real SPA, without the headache and large bundled JS files. Feels refreshingly simple. Still have to figure out the no-build step so I can completely drop Bun/Yarn/Npm, and life will be a wonderful thing.
More comments...