News for hackers. Stuff that matters.
Re:Why Gumroad Didn't Choose Htmx by recursivedoubts on Thursday October 03, 2024 @04:04PM (#41734400)
There is an htmx demo on drag-and-drop (in the reorder sense) using Sortable.js here:

https://htmx.org/examples/sortable/

Like most of the examples on the htmx site it is pretty bare bones (we keep it that way to focus on the concepts) but it's a reasonable demonstration of the integration. Whether that is good enough of course depends on your use case

If you want an integrated and polished ecosystem that's something htmx isn't going to provide: it's a library focused (mainly) on one thing: generalizing hypermedia controls. So, when you want client side functionality like this, you are going to have to glue things together a bit. I completely understand the desire of having an integrated ecosystem to avoid doing that.

Re:Why Gumroad Didn't Choose Htmx by hencq on Thursday October 03, 2024 @06:47PM (#41735898)
Thanks! That actually seems very smooth. Trying out htmx has been high on my list for a while when I finally get time to do a little personal side project. Real life keeps getting in the way, but this is a good nudge. The appealing thing about htmx to me is that it seems like it should be very easy to keep everything in your head.
Re:Why Gumroad Didn't Choose Htmx by mthoms on Thursday October 03, 2024 @08:32PM (#41736579)
Does it support nesting?
Re:Why Gumroad Didn't Choose Htmx by recursivedoubts on Thursday October 03, 2024 @09:15PM (#41736831)
here htmx is integrating with Sortable.js for drag and drop functionality via events, so whatever Sortable can do, htmx can respond to:

http://sortablejs.github.io/Sortable/

Re:Why Gumroad Didn't Choose Htmx by mthoms on Friday October 04, 2024 @03:57PM (#41745030)
I'm kinda familiar with Sortable, but haven't looked at it in the past several years. I'll have a look again, thanks!
Re:Why Gumroad Didn't Choose Htmx by spirobelv2 on Thursday October 03, 2024 @10:08PM (#41737135)
after having used both: sortablejs is better than reactdnd.

that being said: htmx makes it too hard to quickly add a fat frontend to a page when necessary. The points about the react ecosystem are very valid, even if drag and drop is an exception. The network effects of react and others are hard to beat. Its probably even more npm as a whole than just react.

wrote myself a framework with bun that solves this for me: https://github.com/spirobel/mininext

still get the pure html+css feeling like with htmx, but can throw in a big frontend when needed.

https://x.com/spirobel/status/1827231794934247674?t=moRzsWIP...