News for hackers. Stuff that matters.
Re:Datastar: Lightweight hypermedia framework for building i... by didip on Friday October 10, 2025 @07:56PM (#45545132)
Anything that’s using server side rendering gets my vote.
Re:Datastar: Lightweight hypermedia framework for building i... by replwoacause on Saturday October 11, 2025 @01:30AM (#45546837)
Mine too. I’ve been playing with this lately

https://www.zjax.dev/

And I like what the author is doing

Re:Datastar: Lightweight hypermedia framework for building i... by nchmy on Saturday October 11, 2025 @06:12AM (#45547950)
Not at all, for many reasons.

HTMX doesn't do any client side interactivity. You need something like alpinejs for that. And alpine doesn't have signals, which are super useful (when used judiciously)

Datastar uses sse rather than websockets, which is simpler and more compatible http,web standards etc. Htmx can use either sse or ws, but both are a separate plugin.

Consequently, datastar does much more than htmx+alpine+ws/sse, in a fraction of the js size.

Htmx (and alpine, I think) introduces it's own html attributes whereas datastar uses spec-compliant data-* attributes (hence the name)

Htmx's api is much more complicated due to all of the extra attributes. Datastar is more concise.

Datastar has backend SDKs for all popular languages, to make it easy to send html fragment and signals updates via sse.

There's lots more as well. Very worth checking out.