News for hackers. Stuff that matters.
Re:I Switched from Htmx to Datastar by vasquez on Friday October 10, 2025 @08:56AM (#45538463)
I like the alpine-ajax API. You specify one or more targets and it swaps each of those elements. No default case or OOB, just keeping it uniform instead.

As for Datastar, all the signal and state stuff seems to me like a step in the wrong direction.

Re:I Switched from Htmx to Datastar by naasking on Friday October 10, 2025 @10:50AM (#45539731)
I thought alpine ajax did OOB on any ids returned in a response.

Edit: right, as long as the element has x-sync on it, it will receive any OOB updates from any response.

Re:I Switched from Htmx to Datastar by imacrayon on Friday October 10, 2025 @02:03PM (#45541911)
You can swap multiple elements with targeting too: `x-target="comments comments_count"`, but, yeah most of the time `x-sync` is better.