π Detailed Explanation
Islands Architecture is a web architecture pattern first named by Katie Sylor-Miller in 2019 and popularized in earnest by Jason Miller (creator of Preact) in 2021. The name derives from the metaphor "interactive islands floating in a sea of static HTML"; most of the page is served as static HTML, and JavaScript is selectively loaded only for the parts that need interaction.
A traditional SPA (Single Page Application) hydrates the entire page with JavaScript, resulting in slow initial loading and delayed TTI (Time to Interactive). Islands Architecture treats each interactive component as an independent "island" and hydrates only the necessary parts individually. As a result, most static content is rendered immediately, and JavaScript is loaded progressively.
Astro is a representative framework for Islands Architecture, and it allows fine-grained control over when hydration occurs through directives such as `client:load`, `client:idle`, and `client:visible`. Deno's Fresh aims for Zero JavaScript by default, and Marko automatically generates optimal islands. Qwik eliminates hydration itself through a concept called Resumability.
Islands Architecture is particularly well suited to content-focused websites (blogs, documentation, marketing pages). It can reduce the overall JavaScript bundle size by more than 90% and significantly improves Core Web Vitals scores. However, it may not be suitable for applications that require complex state sharing, and communication between islands requires additional design.
π£οΈ Examples of Practical Conversations
π¬ Situation: Discussing the tech stack for a blog platform renewal
Developer A "Our blog is currently built with Next.js, but the Lighthouse score is in the 60s. Most of it is static content, yet the JavaScript bundle exceeds 300KB."
Developer B "How about applying the Islands Architecture pattern? If we migrate to Astro, we can hydrate only the interactive parts such as the search bar and comments, and serve the rest as pure HTML. There are cases where similar sites reduced JavaScript by 90% and achieved a Lighthouse score of 95 or higher."
Developer A "What about our existing React components?"
Developer B "Astro lets you use React, Vue, and Svelte all on the same page. You can bring your existing React components in as islands as they are. If you use the client:visible directive to load them only when they become visible by scrolling, the initial loading will be much faster."