flexterra
Joined 18 years ago
Karma
1,648
Submissions
286
Member since
Oct 31
Joined 18 years ago
IMHO something slightly more complex than this example (more client side stat) will require using something like React/Vue/Svelte. But there's no need to rewrite the whole FE. Just create a component that performs the rich client side interaction and use HTMX for the rest of your app. Win-Win.
That said, using React on the server side and forcing you to run JS on the server is not my cup of tea...
If you are doing the SPA thing correctly you must duplicate business logic (data validation). Also when your API just sends "dumb data" (JSON) to the client, you are forced to make changes to the backend and frontend in lockstep.