top | item 45538463 (no title) vasquez | 4 months ago 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. discuss order hn newest naasking|4 months ago 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. imacrayon|4 months ago You can swap multiple elements with targeting too: `x-target="comments comments_count"`, but, yeah most of the time `x-sync` is better.
naasking|4 months ago 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. imacrayon|4 months ago You can swap multiple elements with targeting too: `x-target="comments comments_count"`, but, yeah most of the time `x-sync` is better.
imacrayon|4 months ago You can swap multiple elements with targeting too: `x-target="comments comments_count"`, but, yeah most of the time `x-sync` is better.
naasking|4 months ago
Edit: right, as long as the element has x-sync on it, it will receive any OOB updates from any response.
imacrayon|4 months ago