Re:Show HN: Alpine Ajax – If Htmx and Alpine.js Had a Baby
by pietz on Monday March 04, 2024 @02:12PM
(#39594629)
Can it do something similar to hx-trigger="load"?
[ Parent
| on HN ]
Re:Show HN: Alpine Ajax – If Htmx and Alpine.js Had a Baby
by imacrayon on Monday March 04, 2024 @03:08PM
(#39595330)
Yeah, Alpine components have `x-init` that works just like the load trigger. You can fire off an AJAX request inside that directive, there's an example here: https://alpine-ajax.js.org/examples/lazy-load/