When to hydrate
Below the fold? Don't load it yet.
client:load is the easy default — but it eagerly downloads and hydrates every island the moment the page lands.
If your comments section is 300px down the page and 30 KB of JS, you don't need it for the first paint . Astro has finer-grained hints.
// loads immediately on page load
// use for: above-the-fold widgets
<Hype client:load />
// loads when the browser is idle
// use for: nice-to-haves, animations
<Newsletter client:idle />
// loads when it scrolls into view
// use for: anything below the fold
<Comments client:visible />
// loads only on mobile (or any media query)
<MobileNav client:media="(max-width: 700px)" />
// renders on the client ONLY — never on the server
// use for: things that need window, localStorage
<Map client:only="preact" /> Default to client:visible . It's the most polite — your bundle only loads if the user actually scrolls there.
client:only is the escape hatch — for libraries that crash on the server because they read window or document .