3 ms·
the vast majority of (non-native) react applications require a back-end, at the very least to deliver them to users htmx-powered applications can be local-only
by recursivedoubts 2y ago
the vast majority of (non-native) react applications require a back-end, at the very least to deliver them to users
htmx-powered applications can be local-only via service workers[1]
i think there is a sense in which htmx vs. react is apples to apples, in that in the common case they are used to build web applications that talk in some manner to a back-end system. On the other hand, it is true that react does require additional support code in order to do that communication.
Regardless of that latter fact, and the fact that htmx does not require a server, there is a large overlap in practical applications that might be built with either, so it is good to know the strengths and weaknesses of both for comparison.
[1] - https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers https://developer.mozilla.org/en-US/docs/Web/API/Service_Wor...
- toastercat 2y ago> the vast majority of (non-native) react applications require a back-end, at the very least to deliver them to users I mean, I guess if you consider me opening an index.html file in my browser requiring a backend in that my desktop operating system is the "backend server", then yes, but that's not what I was referring to. I don't think most folks would consider a CDN to serve static assets to mean "your React app requires a backend" in the traditional sense -- but that's a game of semantics. > htmx-powered applications can be local-only via service workers Do you have any examples of an HTMX app running completely client-side using service workers? Funny enough, the only example I found online ends up using Preact to render templates in the SW, but as a whole, this looks less ergonomic than simply using <insert JS library here> to build a SPA: https://joshi.monster/posts/serverless-htmx/ https://joshi.monster/posts/serverless-htmx/ > there is a large overlap in practical applications that might be built with either, so it is good to know the strengths and weaknesses of both for comparison. I could agree with this. I only care that people understand there are tradeoffs.