Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Except when your state appears in many parts of the page, HTMX makes it hard to keep everything updated.


Fully ack. But this can actually be turned into something good imho: I try to challenge all layers (Analysis, UI / UX design) on simplicity: "Do we really need X parts of the page all be affected / updated by something? How could we design it differently with locality in mind? Can we simplify the state somehow?" -> I think that the resulting solutions are often simpler, cheaper, and work just as well.


agreed: htmx is good for "swap out this one element and its children". It is not good for "and these other related elements need to update"


> It is not good for "and these other related elements need to update"

That seems a bit backwards, no? Why can't those other elements manage their own updates? You can have the server respond with an `HX-Trigger` header to dispatch an event and any elements that care about that event can listen for it. Far simpler than trying to coordinate surgical DOM updates in a single HTTP request.

Events form the backbone of the browser environment and leaning into that model makes a lot of things much easier


To a certain extent, it works, but there's definitely a point of complexity that you can hit in the app at which it becomes painful. Those are the kinds of apps where htmx is just not a good fit.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: