by ForHackernews · 1y ago · 0 comments
Hotwire is a fundamentally different concept, the radical idea of delivering HTML to browsers designed to render HTML: https://hotwired.dev/
Maybe we have different things in mind when we say "hydrating", but my understanding is that Hotwire/Turbolinks does not involve any fat JS app with virtual DOM, state management, etc. on the client side. All of that logic remains on the server, and it delivers chunks of HTML (over HTTP or websockets, it doesn't matter conceptually) that replace elements in the page without requiring a full page reload.
You get the "feel" of a SPA, without all the headaches that come with it.
And no, we are not sending anything around with websockets. It's full server-side HTML generation, hotwire takes care of doing delta updates to the existing HTML