Top
Best
New

Posted by rmsaksida 15 hours ago

Htmx 4.0(four.htmx.org)
576 points | 142 comments
dec0dedab0de 9 hours ago|
I really like htmx, and intercooler.js before it. It's been a while since I tried to convince a co-worker to use it, it might be time to try again. Either way I can't wait to try out the new version.

Full Disclosure, I am CEO of HTMX

jdlshore 9 hours ago||
Given the number of people claiming to be CEO of HTMX, I have to ask: what’s the joke I’m missing?
stanac 9 hours ago|||
There is something here, but I am not sure if it's the whole story: https://htmx.org/essays/lore/
dec0dedab0de 8 hours ago|||
yeah, basically recursivedoubts is pretty funny.

https://x.com/htmx_org/status/1726986945430233323

andrewflnr 53 minutes ago||||
This is a social media presence worth striving for.

> You can put it on your LinkedIn, because it’s true.

I only take LinkedIn seriously under extreme protest, so this is extremely tempting.

ecshafer 8 hours ago||||
One of the things that is great about htmx (besides being the best library) is the lack of modern silicon valley corpo communication. It has the slightly unhinged feel of a nerd that spent too much time on Newgrounds or 4chan or something awful. Which is how the internet aught to be.
testdelacc1 7 hours ago||
> unhinged

Please take a look at the official documentation for htmx, which specifically clarifies that the author owns many hinges.

mkl 4 hours ago|||
https://htmx.org/essays/lore/#hinges
DANmode 3 hours ago||
I can’t believe he turned that offer from Microsoft down.

Absolute madman.

Barbing 5 hours ago|||
Thanks for sharing that.

It's just about all Twitter links, where's XCancel/Nitter when you need 'em :(

crtasm 5 hours ago||
Try https://www.sotwe.com/
DANmode 3 hours ago||||
You seem to have it!
birdatlaw 9 hours ago|||
[dead]
dfee 8 hours ago|||
> I really like htmx

> Full Disclosure, I am CEO of HTMX

i think you've found a good job!

nzoschke 12 hours ago||
Congrats and thanks! htmx brings me joy.

Pretty much every experiment I build now starts with Go, htmx, and SQLite to keep things simple and fast but still responsive.

I put a few more thoughts about this here:

https://housecat.com/blog/the-hugs-stack-hypermedia-unix-go-...

sgt 11 hours ago||
Agreed.

In fact, I find Django and Postgres to be the best solution for htmx but Go stack is probably almost as good in terms of developer velocity and obviously much faster. So I think that's a good solution.

You can really build powerful production apps with htmx, and what people underestimate is how good it is with AI assisted development (Claude understands it and does it well, and if any JS glue logic on a specific template is required, it's pretty well written and not a mess).

farmeroy 7 hours ago|||
I had a great role for just over a year building with django/postgres/htmx! i ended up using lightweight web components for my js glue code (as well as shoelace, now web awesome, components). once a few patterns were established, claude code was extremely proficient. now getting back into frontend framework world i'm realizing what a lightweight, enjoyable experience that was...
Analemma_ 11 hours ago|||
Django + Postgres on the backend plus a frontend of HTMX + alpine.js for a light touch of interactivity where needed is a killer combination. Claude is very good at it, and with the right instructions actually keeps things concise and modular without spilling into spaghettification. I would recommend this as a first option to anyone looking to spin up a new web stack if you’re not absolutely sure you need the heavyweight of React.
WD-42 8 hours ago||
I use the same stack. Single codebase, no build step. It’s so refreshing.
michaelchisari 11 hours ago|||
I call it the GOSH stack (Go Sqlite Htmx) but HUGS is good too.
35mm 7 hours ago|||
Or RASX (Rust Axum Sqlite Htmx)

Skill.md here: https://github.com/dunctk/rasx-app-framework

FartinMowler 9 hours ago|||
Or HAGS (HTMX, AlpineJS, Go, SQLite).
pepperoni_pizza 7 hours ago||
Someone asked about using htmx with php on reddit, and was recommended a HAYW (Hypermedia on Anything You Want) stack.
trueno 2 hours ago|||
i use this stack quite a bit too. i made the claude do some load bearing 360 backflips, gate and seam a whole buncha smoking guns, and bolt go-starlark on top of this so i can just declare little web apps like its streamlit but it doesn't feel sucky like streamlit. i get to just write little blurbs of python-looking code and i get these fully reactive tools. probably my favorite and most used abstraction that came from too much wine and lazy boredom. also built stupid simple framework ish coverage for connections and duckdb and a few other things.
ajayvk 2 hours ago||
Go backend with Starlark for dynamic behavior is a great combination. I have been building https://github.com/openrundev/openrun with that approach, mainly for teams to deploy internal tools. It can be used to deploy any containerized application. The management UI for OpenRun is built with the Hypermedia approach https://utils.demo.clace.io/console/
kaycebasques 12 hours ago|||
Oh wow, interesting combo that I would never independently reach for, but thanks to your template I might have to give it a whirl!
dimaaan 9 hours ago|||
If you want a prototype fast, don't you use an LLM?

And if you do, why start with a simpler framework?

shimman 10 hours ago||
I also like the same stack, as it plays very well with a terminal focus workflow.
rednb 7 hours ago||
Maybe a contrarian view, but as someone very knowledgeable about .NET API backends + angular on the frontend, I've found that HTMX made things more difficult as it required me to move back to mixing presentation concerns with business-logic and data concerns (basically have the backend produce the UI, which is whole point of HTMX).

This is not a criticism but I suspect that the people enjoying HTMX are either people preferring old-school server-side rendering or react users.

Just sharing my experience, because HTMX is the absolute darling of hacker news.

Since i mainly develop real SPA, i found that is more complex than just using typscrpit if you build something non-trivial as managing state on the server is not fun at all.

In my opinion if you are happy using angular, you'll find that HTMX is a step backward in terms for dev experience. Can't speak about react, but since it is not a battery included stack unlike Angular, i can understand why many people find they'd be better off moving things server-side instead of messing around with 15 third-party libraries. My 2 cents

perardi 6 hours ago||
I agree. We are moving away from HTMX at work, to React. (After we moved away from Angular. That was…a choice…that I didn’t make.)

Here’s the thing: there’s still a place for HTMX. Lots of places. But “building an SPA but not actually and SPA” is not a lane for HTMX. Nor do they promote HTMX for that purpose. Really quite the opposite.

Different tools for different jobs. (Me? I honestly love React, just a more minimal stack. Zustand and TanStack and Vite. No Redux or Next.JS)

embedding-shape 5 hours ago|||
Yeah, typically I end up building websites (for myself and others) in basically three "lanes". Static HTML/CSS files, great for docs, presentations, reports and similar. Or, websites with some interactive/dynamic elements, HTMX is great for this. Or, fully fledged "client-side apps" where it's more of an application than website, then I go full out dynamic programming with ClojureScript and similar approaches.

I'm not sure why so many people seemingly fall into the trap of trying to find one tool and then use that absolutely everywhere. I mean, I'm familiar with it as in "it's fun" as I used Nix as a framework for a static website builder, but I keep seeing people making those sort of choices professionally too. Like when React first became popular, then suddenly people try to jam it into absolutely everything, until they slowly walk back and then after some years agree that maybe it's good for some things, not for everything and not as a default.

perardi 3 hours ago||
Ha, that was me and Hugo, back in the day, for static sites.

And, yeah, HTMX is truly great for sites with limited interactivity. You really, really do not want or need a full React Leaning Tower of Pisa stack for a simple presentational website.

kvirani 4 hours ago|||
Nice. Curious about your views on SolidJS?
aidenn0 4 hours ago|||
> ... managing state on the server is not fun at all.

Do you not have a database for your backend? Managing state is kind of their thing.

radicalbyte 6 hours ago|||
There are an army of people using SPAs for problems best served by a simple and more traditional website. It has been a thing since SPAs started showing up so you have a whole generation who think that Next.js is just how you build for the web.

Then HTMX is to them what the micro-ORMs were for me (and, if you've been in .Net for a couple of decades, I suspect you too).

xp84 5 hours ago|||
> managing state on the server is not fun at all.

Really? I've never found that difficult. Sessions exist, URL parameters exist... Perhaps in a complex SPA you can have trouble, but so many of the "applications" I've worked on are just glorified documents.

intrasight 2 hours ago|||
> mixing presentation concerns with business-logic

That's on you not on your platform

fatplexer 5 hours ago||
I'll shill datastar for a second, there's barely a notion of frontend state management if you treat HTML as a projection surface with interactivity. I'd argue HTML is the most efficient wire format for interactive web apps, especially with streaming + compression.

Seriously DB->json->client->toHtml

DB->toHtml->client

Just imagine if that html wire format also conveyed the interactivity too and you eliminate the issues. And you can always seperate whatever concerns you want in whatever tpl lang of your choice.

Also htmx 4 is kinda just an worse datastar funnily enough In it's own way.

turtlebits 10 minutes ago||
Datastar relies way to much on IDs everywhere that it's not ergonomic and turns into a chore. It's also a bit too complicated for its own good trying to solve everything.
james2doyle 11 hours ago||
> `hx-alpine-compat` - smooths over compatibility issues between htmx and Alpine.js

I looked into this when I tried HTMX 4 on a project earlier this year. I actually found that https://alpine-ajax.js.org/ was smaller than HTMX while providing all the features I needed. It is one of the sanctioned projects they link to so I felt good using it

recursivedoubts 11 hours ago|
great library, we link to it on our alternatives page
zanderwohl 10 hours ago||
Carson! FYI:

"let us rething how extensions can and should work,"

I think you meant rethink here.

recursivedoubts 10 hours ago||
Proof it wasn't AI generated! Thank you!
threesmegiste 6 hours ago||
A thoughtful, clean, and useful library that wasn't built to climb the corporate ladder. It grew organically. I think it became a cry of relief for those annoyed by unnecessary complexity, which also boosted its recognition. It served as a starting point for things like Datastar, too. I believe it brought a refreshing breath of air to the frontend landscape.
miguel-muniz 7 hours ago||
As the CEO of HTMX, I've never used HTMX but I've been keeping an eye on the releases, essays, and talks. Congratulations to the team.
havaloc 12 hours ago||
Before vibe coding was a thing, HTMX made it super easy for me to implement Ajax like features. It was the most approachable library I've ever seen, and I'll always be grateful for it.
matthew-craig 9 hours ago|
What about vibe coding makes HTMX something that you speak about in the past tense? Are you just generating frontends in vanilla JS now?
havaloc 1 hour ago|||
It's day job tasks/database CRUD, so I tell the LLM what I need. I used to write all my work apps in plain jane PHP/MySQL and I use that as a guide for the LLM, as in use this app as a guide on how I want things. The bonus of using plain PHP/MySQL/PDO is that the apps are small, so no issues with context windows or using complex frameworks.
LVB 8 hours ago|||
For me, I know backend development really well, and HTML/CSS passably. HTMX has been much lower friction for me than learning JS frameworks, which tbh I didn't really enjoy, and they were constantly changing. But now, I had mostly leave the JS to Claude, and the HTMX draw has diminished a bit.
Baguette5242 13 hours ago||
As CEO of HTMX, I am very proud of the work achieved by the team.
all2 12 hours ago||
As fellow CEO of HTMX, I approve of this statement and concur. I think our next major moves will be to monetize our assets [0].

[0] https://www.youtube.com/watch?v=GyV_UG60dD4

GrayShade 12 hours ago||
> Like it or not, a lot of people are using LLMs and we are providing the following skills files for

For what? Don't leave us hanging!

recursivedoubts 12 hours ago||
lol sorry about that, had a fix sitting in four-dev, merged to four and pushed, should be updated
hmokiguess 8 hours ago||
For those wondering, here's how you can join me, the CEO of HTMX, as CEO of HTMX: https://htmx.ceo/
bluesnowmonkey 7 hours ago|
I found Htmx to be a great combo with agent driven development. It lets you end-to-end test the UI without a full headless browser by just examing the HTML, which means UI tests are cheap and fast, which means you can have tons of them. And coding agents are exactly as good as your test coverage. So with Htmx they're great.
thewhitetulip 2 hours ago|
Well, if someone is going to vibe code they don't have enough background on searching a good tool. They'll just ask LLM and LLM defaults to a Javascript based thing
More comments...