DEV Community


Discussion on: Is 0kb of JavaScript in your Future?

grocker42 profile image

What's about hotwire where you can render all on the server, but also get the spa like feeling?

ryansolid profile image
Ryan Carniato Author

Hotwire does achieve the goal from a UX standpoint mostly. But a lot of this is coming from the perspective of DX. With most of these solutions (save maybe Astro) you build everything as a single app, single shared technology, single state model(most important), very similar to how SPAs are developed today. You basically write one congruent app.

Nothing wrong with Hotwire and it in a sense is a natural progression from techniques we've been using to ship partials since we've been able to AJAX. Although generally turbolinks(underlying tech) is big enough itself to bundle so I sort of view it like a framework since it is larger than Svelte or Preact. But it is sort of outside of this trend.

I see stuff like Hotwire almost complementary to any MPA architecture. Things like Astro/Marko would definitely consider leveraging the same approach. And in a sense React Server Components have a lot in common with Hotwire. I expect to see more similar things come in if library authors can figure out how to keep the DX seamless.