https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guid...
Please just try HTMX
51–60 of 530 posts
Re: Please just try HTMX
#52So we are almost back to using XSLT (and this is a good thing)
Re: Please just try HTMX
#53No bundler required, no compilation step.
Re: Please just try HTMX
#54If 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…
> 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 sw…
Your browser will still run js. See sibling thread.
Re: Please just try HTMX
#55Re: Please just try HTMX
#56Earlier quoted context omitted.
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/
Thanks I'll look into it, but on first glance I feel like I just got space blasted by the website! What happened to simple websites eh
Re: Please just try HTMX
#57Hey, I created htmx and while I appreciate the publicity, I’m not a huge fan of these types of hyperbolic articles. There are lots of different ways to build web apps with their own strengths and weaknesses. I try to assess htmx’s strengths and weaknesses here: https://htmx.org/essays/when-to-use-hypermedia/ Also, please try unpoly: https://unpoly.com/ It’s another excellent hypermedia oriented library Edit: the arti…
Re: Please just try HTMX
#58..and be unemployed. The article doesn't define any target audience in specific, so there you go.
Re: Please just try HTMX
#59I am tired of people using the smallest "Hello World" example to demonstrate how something is better than React -- "See, you don't need all these things to get a website up and running!" Of course it will work. I can vibe code the most terrible web framework you have seen within 20 minutes and claim it is better than React, but what does it prove? > You write zero JavaScript > The whole library is ~14kb gzipped Oh su…
Like c'mon, if I'm using Vue, I'm using Vue. Same for React. Strap me into the native state management solution for your framework, your router, your preconfigured bundler. I'm not here to mess about or I'd have just stuck with vanilla.
Re: Please just try HTMX
#60My startup did.
And now we’re going to rip it all out and move to a React front-end.
HTMX makes response handling much more complex. Every endpoint returns 3–5 different HTML fragments. Frontend and backend must agree on every scenario — success, validation errors, system errors, partial updates, full reloads.
And HTMX is still a fairly obscure library. The documentation and examples are lacking, there isn’t a real set of established best practices at scale, and not for nothing, LLMs aren’t great at it.
React is mature, used at scale, provides separation of concerns, and is great for agentic AI coding. HTMX has its place for simple projects, but for anything non-trivial, it’s a no for me.