Hacker News new | ask | show | jobs
by unclebucknasty 820 days ago
Yeah, it is insane how complex and wonky attempting to manage state becomes without a coherent model.

I kind of see HTMX as discouraging the traditional SPA-ish state management approach though. Or, it could be that the idea just gives me peace of mind. But, the idea being that you manage state less on the client because you're updating the UI with DOM content generated on the server versus rendering from local state on the client.

In practice, of course, avoiding client-state can be tough, especially as you go from sprinkling in limited dynamic interaction to a full-on SPA experience. I'm a little different though, in that I'm not sure SPAs were ever a good idea—at least without shifting completely away from building directly on Web idioms like DOM, HTML and CSS.

1 comments

Yeah this is exactly it, HTMX does discourage this. And this is why my conclusion from my experience was that you either need to only use HTMX, or to do frontend "properly" with some sort of state management, because being somewhere in the middle is a pretty bad experience.