I read about approaches like this and I still don’t see the reason to do them, beyond “because you can” and “JavaScript is bad”. The separation of data and display logic between server and client is a sensible separation of concerns. It’s the way any non-web solution does it and I don’t really see what would make the web so special that a different approach is worth it.
that's fine that you dont see any reason to use the web as it was designed to be used. But I dont see any reason for me to engage any further with you.
The problem with JS heavy frontend is you now have TWO applications. The real application, on the backend, which makes all the decisions, and the frontend application.
You have TWO states which are being mutated independently that you now have to sync.
you guys are furiously arguing (and not really listening) about this or that hammer being good enough to treat every problem as a nail, like ssr was the "holy hammer". well, it isn't and not every problem is a nail, and while datastar looks excellent to me i simply would have no use for it if i needed client side logic or state for whatever reason.
It has a whole client side signal system.
to be clear, my point was that where the state has to be managed is more often than not an architectural decision given by the requirements, and the choice of tools should be a consequence of that, not a precondition.
The client side logic is, usually, just to make the developers happy because developers love complexity.
Obviously there are many exceptions. But not every application is exceptional. We all hate to admit we're working on simple or trivial things but... We are. Often.
Anyway, browsers are built specifically to render HTML. And html/hypermedia is specifically meant to manage and transfer state. The web has lost its way. If you want to read more about this, this free book is a great start: https://hypermedia.systems/book/contents/
Or the essays at HTMX https://htmx.org/essays/
Good luck to you