Choosing the Right Client Directive for Astro Island Hydration
Learn how to choose between Astro's client:load, client:idle, client:visible, and client:only directives to optimize page performance and interactivity.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to choose between Astro's client:load, client:idle, client:visible, and client:only directives to optimize page performance and interactivity.
Astro’s Islands Architecture lets you ship only the JavaScript you need. Learn how to use client directives, share state between frameworks, and verify the result in a practical example.
Learn how Astro’s Islands Architecture lets you load JavaScript only when needed, using client:load, client:visible, and client:only directives to keep content‑heavy sites fast.
Learn how Astro's Island Architecture uses partial hydration to eliminate unnecessary JavaScript, improving page load speeds by selectively hydrating interactive components.
Astro's island architecture hydrates only the interactive components you explicitly mark, shipping zero framework JavaScript for static content. This guide explains the mechanism, directive choices, composition patterns, and common pitfalls with a worked example.
Learn how to lazy‑hydrate Astro islands with the client:visible directive to reduce initial JavaScript, improve LCP and FID, and keep interactive components ready when users scroll into view.
Stop bloating your frontend. Learn how to use Astro's Islands Architecture to selectively hydrate components and reduce Total Blocking Time.
Learn how Astro's Islands Architecture eliminates unnecessary JavaScript by using partial hydration and client directives to improve page load speed and TBT.
Astro ships zero JavaScript by default; client directives decide when each interactive island hydrates. Learn what client:load, idle, visible, media and only actually do, with a worked chart example and the mistakes that quietly recreate SPA-sized bundles.