Hacker News new | ask | show | jobs
by kaoD 382 days ago
> If presentation is the job of the server (html templates), the server is the source of truth and the client state is expected to be transient.

Which is exactly why the client state should be transient non-application state like datepickers, dropdowns, text boxes, etc. and it does not belong in the server (essentially what jQuery was used for back in the day, interactive sprinkles). And the other way around.

Perhaps you agree with me but there was something lost in translation?

1 comments

Something was lost. I was arguing either send the presentation layer as data to the web browser as resources, or send data that from which the browser and the UI library (react, svelte,...) will derives the UI from.

RSC does a weird split where the engine is the same on both ends instead of a clear separation layer where one does not need to know about each other. I much prefer HTMX approach (samey old backend where you mostly take care of everything in the frontend) and Laravel Livewire approach (where you take care of everything backend side, with optional client side scripting).

No need to reinvent the world to fix a single problem.