Astro Islands & SSR (50 Qs)•Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)
Deep Dive into the Astro Islands Hydration Engine.
senior LevelSSR & HydrationSystem DesignAstro
In Simple Words: How Astro loads islands without client overhead:
- The server serializes the component props into JSON attributes:
<astro-island component-url="/_astro/BuyButton.js" props="{...}">. - Astro injects an ultra-lightweight client script (<1.5KB) that parses island elements and attaches an
IntersectionObserver(forclient:visible) orrequestIdleCallback(forclient:idle). - The framework bundle (React or Svelte runtime) is downloaded only when the hydration condition is met, keeping initial page load lightning fast.