If I use alpine.js why do I need htmx still? I would use either of them but not both. Using both seems making a supposed-to-be-simple approach immediately back to complicated-again-now-you-need-two-components.
alpine increases client side interactivity, it can also do ajax to talk with server, why do I still need htmx then?
On the other hand if I use htmx I will probably use its hyperscript for interactivity on the client side, to be 'consistent'.
Note both projects are trying to make frontend simpler, mixing them seems not to help that goal to me.
The pattern is that you use htmx for anything it can do, then use Alpine for things that shouldn't/can't require a server round-trip (toggling sidebar, animations etc).
You can reimplement htmx functionality with Alpine, but htmx is a lot better than `@click="fetch('/partial').then(res => res.text()).then(frag => $el.innerHTML = frag)"` all over the place (with a slight variation in that one component that you miss because of the noise).
Don't use _hyperscript just to be "'`consistent`'", use it because you want to. Being agnostic and playing well with other tools is a big thing for htmx. _hyperscript is lots of fun and lets you write very readable code, but you also need to stomach a 26mb bundle just to toggle some classes :/
(if anyone reading this can help us make it smaller, LMK)
alpine increases client side interactivity, it can also do ajax to talk with server, why do I still need htmx then?
On the other hand if I use htmx I will probably use its hyperscript for interactivity on the client side, to be 'consistent'.
Note both projects are trying to make frontend simpler, mixing them seems not to help that goal to me.