logoalt Hacker News

bottlepalmlast Thursday at 7:58 PM2 repliesview on HN

I’ve used jquery which is very heavy into html fragments. It can get unwieldy compared to keeping all your rending logic in one place and applying data to it like in React. Other comments here validate the suspicion that HTMX can fall apart in large systems.

Unless you’re saying the components returned by HTMX are using the shadow dom for isolation, you can very easily run into styling problems by changing a style and not realizing some injected fragment of HTML somewhere relies on it being a certain way. I hope you’re using a monorepo because unlike typescript APIs, those HTML fragments and CSS styles are not type checked.


Replies

bccdeelast Thursday at 10:42 PM

Well yeah, HTMX wouldn't be a good fit for micro-frontends, but I didn't think many people were actually using those. You have to write all your html in accordance with a single stylesheet, but that strikes me as the least of HTMX's impositions.

array_key_firstyesterday at 1:34 AM

That's because jquery takes a very global approach to the DOM, which will naturally lead to spaghetti code.

Every backend framework, be it dotnet or Symphony or Rails, has a concept of components. It's a non-issue.