> SPAs have allowed engineers to create some great web applications, but they come with a cost: ... Managing state on both the client and server
Having a separation of concerns between server and client is the whole point, and replacing JSON APIs with data trapped in HTML fragments is a massive step backwards.
What if we need the same backend to be usable by more than one client? What if those clients aren't even a SPA, but a wrapper library, or a native app? What if we need internal scripts that manage the content in the backend using the same API? What if we need to redesign the client without touching the backend?
HTMX doesn't address any of that. YAGNI is often only true for the original developers, not everyone else who has to maintain it long term.