←back to thread

Less Htmx Is More

(unplannedobsolescence.com)
169 points fanf2 | 6 comments | | HN request time: 0.942s | source | bottom
1. DeathArrow ◴[] No.43619823[source]
I thought HTMX is useful mostly for SPA style apps. If you want a website with individual pages you can mostly use HTML and a bit of vanilla JS for the stuff that needs to be dynamically updated.
replies(2): >>43619854 #>>43619863 #
2. uzyn ◴[] No.43619854[source]
It's the other way around. HTMX is not suitable for client-side scripting heavy app like SPA. It's more for "traditional" AJAX-style web app.
replies(1): >>43621534 #
3. t-writescode ◴[] No.43619863[source]
htmx gets rid of the "bit of vanilla js" and replaces it with "a couple very, very short tags" and then the backend returns partial html, making the experience seamless.

It's written in Javascript, so yes, some vanilla JS can do the same thing; but this library makes that experience easier for the masses, and likely well-tested to the point where more trust can be given to it to be correct.

4. skydhash ◴[] No.43621534[source]
And if you’re not building a very interactive desktop app, you have no need for an SPA.
replies(1): >>43622075 #
5. DeathArrow ◴[] No.43622075{3}[source]
How would something like Facebook, Instagram, Netflix work and look if they weren't Spas?
replies(1): >>43623407 #
6. skydhash ◴[] No.43623407{4}[source]
There's nothing inherent to those sites that warrant SPAs. Things that do warrant SPA are full blown apps like Gmail, Figma, Google Maps,... or if you're building a desktop-like dashboard like Synology NAS's.