Hacker News new | ask | show | jobs
by Scarbutt 560 days ago
The issue with that approach to hydration is that it causes the browser to freeze.
2 comments

I'd say that depends on the complexity of the page but yeah, it is a real possibility. What tools like Astro (and also the recent Vue 3.5) provide here is an escape hatch in the form of opportunistic/lazy hydration and rendering. Just yesterday I shaved 200ms off of my hydration time by converting a Vue component to an async component that gets hydrated upon interaction.
I've yet to see it with a wide range of sites. If you're getting browser freeze, something is wrong with your actual JS, not the framework.

In the case of Joystick, because it's sending SSR'd HTML to the browser automatically, you typically don't even see the hydration take place.