Hacker News new | ask | show | jobs
by recursivedoubts 744 days ago
the htmx/hypermedia approach doesn't perclude scripting for client-side interactions:

https://htmx.org/essays/hypermedia-friendly-scripting/

https://hypermedia.systems/client-side-scripting/

1 comments

It does not, and I was specifically talking about local state changes. I’ve seen it misused a fair bit, and these trivial examples that tend to be local in real applications don’t help guiding developers who are not keenly aware of the existence of poor connections.

Additionally, while not htmx, in the adjacent land of LiveView, client side scripting is a bitch. I built a complex application in LiveView two years ago and later regretted it. Hard to resolve client side state and server side state diverging with complex but local state changes, and complex local changes are made more difficult than good old imperative jQuery thanks to a managed DOM. It’s extremely tempting to render local state changes with an HTML patch from the server to avoid all the pain, but like I said, high latency users will hate my guts for it.