3 ms·
Fair point. Yet hardly a "radical idea". According to that page you linked, you are still hydrating, just doing it with websockets instead of HTTP requests. Per
by codingdave 2y ago
Fair point. Yet hardly a "radical idea". According to that page you linked, you are still hydrating, just doing it with websockets instead of HTTP requests. Personally, I've spent the last week playing with Astro JS, which lets me build a component-driven app locally for content management, but doesn't serve it to browsers when published -- it renders the whole site to static HTML which I can serve from github pages. It definitely has its quirks, but if you are talking about a goal of just sending HTML to browsers, that seems like a better vision, doesn't it?
- ForHackernews 2y agoThe phrasing "radical idea" was tongue-in-cheek: of course serving HTML over HTTP is the way God intended it. 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.
- wirtsi 2y agoAstroJS is moving in a similar direction as Velocity but already clocks in at 60 dependencies in the create-astro repo. We tried to keep things as minimal as possible. 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