News for hackers. Stuff that matters.
Re:Htmx is part of the GitHub Accelerator by gochi on Wednesday August 16, 2023 @10:05AM (#37147218)
I can only see that experience being true if you've never used jquery (aka the same shorthands you're relying on within htmx and likely hyperscript).
Re:Htmx is part of the GitHub Accelerator by Spivak on Wednesday August 16, 2023 @10:15AM (#37147345)
I think the biggest change from jQuery flows is that the behavior is attached to the elements themselves instead of a script over here poking at the dom from the outside.
Re:Htmx is part of the GitHub Accelerator by giraffe_lady on Wednesday August 16, 2023 @10:14AM (#37147331)
My frontend experience predates the rise of react etc. I have used jquery.

The advantage of htmx over jquery is declaring the replace condition & behavior inline as part of the component. Conceptually this is easy to reckon with as a separation of concerns thing as well as a sandi metz-ish "when would this code need to be changed" thing. The html tag is responsible for its own update, and so its update is part of the html tag.

Jquery does the same things but requires you to declare the behavior separately from the component, decide on & maintain abstractions and reuse patterns. And manage code organization so that for any updatable template code you can find the corresponding behavior declarations and understand their scope w/r/t other template code.

Re:Htmx is part of the GitHub Accelerator by thom on Thursday August 17, 2023 @04:39AM (#37158843)
Most of my experience using jQuery was on sites that required progressive enhancement, and the easiest way to do that was to create an htmx-style framework anyway.