News for hackers. Stuff that matters.
Re:New React docs pretend SPAs don't exist anymore by omnimus on Friday March 17, 2023 @07:51PM (#35204479)
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.

Re:New React docs pretend SPAs don't exist anymore by dmix on Friday March 17, 2023 @08:02PM (#35204540)
A 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.
Re:New React docs pretend SPAs don't exist anymore by omnimus on Friday March 17, 2023 @08:06PM (#35204570)
I 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.

Re:New React docs pretend SPAs don't exist anymore by dmix on Friday March 17, 2023 @08:18PM (#35204646)
Yeah 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).
Re:New React docs pretend SPAs don't exist anymore by NerdiOrg on Saturday March 18, 2023 @07:29AM (#35208146)
What is the difference between html partials and scoped components?
Re:New React docs pretend SPAs don't exist anymore by Xeoncross on Saturday March 18, 2023 @10:16AM (#35209314)
I 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.