5 ms·
Sorry but thats not a good combo. htmx is literally html extension. it is aimed at adding interaction to static html. Preact/react are completely opposite appr
by omnimus 4y ago
Sorry but thats not a good combo.
htmx is literally html extension. it is aimed at adding interaction to static html. Preact/react are completely opposite approach to that.
- dmix 4y agoA lot of people still mix jQuery and React in the same parent project. Mostly just via legacy support when using existing serverside frameworks but still sometimes having the fallback easy DOM/event stuff is just easier when you need to get it done (keeping the HTML/views isolated from each other of course so you don’t mix concepts). It doesn’t sound pretty but they can serve dual purposes. I don’t know enough about HTMX on how it would work implementation wise though and what type of setup.
- omnimus 4y agoI am sure you can do something with it… But htmx is all about replacing server rendered html with server rendered html partials. I would like to see what reacts vdom does when you keep ploping some partials into DOM it thinks it controls.
- dmix 4y agoYeah they’d have to be isolated from each other if that’s the case. Which would defeat the value if it’s a small project starting from scratch with a limited scope frontend-wise (which htmx typically implies whenever I’ve seen it used or mentioned).
- NerdiOrg 4y agoWhat is the difference between html partials and scoped components?
- Xeoncross 4y agoI probably didn't explain it well enough. Preact is the tiny alternative to React (I still think preact could be smaller if they only focused on hooks). I htmx is too bloated, while it's much smaller than the React codebase - I want the tiny, <1k loc alternative that literally just makes working forms and href links into dynamic fetch() responses and maybe adds additional support for auto-refresh from websockets or SSE.