Load less JavaScript in Astro with client directives
Use Astro client directives to hydrate interactive islands only when users need them, keeping the rest of the page static.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Use Astro client directives to hydrate interactive islands only when users need them, keeping the rest of the page static.
Use Astro client directives to load framework components only when needed, keeping pages zero-JS until interactivity is required.
Astro’s Islands architecture lets you keep pages static and hydrate individual components with client directives. Learn how client:load, client:visible, and client:only work, with a practical example and common pitfalls.
Astro’s islands let you hydrate only the interactive parts of a page, keeping the rest static. This blog walks through the core concept, shows how to enable an island, explains the build‑time process, and covers trade‑offs and best practices.
Astro islands can render markup but stay static if the client directive is missing, the renderer isn’t registered, or a runtime error aborts hydration. This guide walks through the condition, common causes, ordered checks, fixes, and escalation steps to get your component interactive again.
Learn how Astro Islands let you keep a blog’s article static while hydrating only interactive pieces like a comment form, reducing JavaScript payload and improving load times.
An architecture note on Astro Islands: how to isolate interactive components, keep static HTML fast, and verify selective hydration in practice.
Learn how Astro Islands let you hydrate only the components you need, reducing JavaScript payload while keeping pages fast.
Explains Qwik’s island‑based resumability: requirements, minimal design with $‑prefixed islands, trust boundaries, runtime checks, failure modes, and when the design must change.