What is islands architecture, and how is it different from partial hydration?

IntermediatePerformance interview questionBy , updated 23 November 2026

Short answer

Islands architecture renders a page as static HTML on the server and makes only a few regions interactive. Each interactive region, an island, ships its own JavaScript and hydrates on its own, often only when it is visible or the browser is idle. The rest of the page never hydrates. Partial hydration is the general idea of hydrating only part of a page; islands are the most common way to do it.

The problem islands solve

A classic server-rendered single-page app sends HTML and then hydrates all of it. Even a mostly static page, such as a blog post with a comment box or a product page with an add-to-cart button, downloads and runs JavaScript for every component, including the header, footer and article text that will never change. That costs download time, main-thread work and Interaction to Next Paint. Background on why hydration costs anything is in what is hydration in React.

Islands flip the default. The page is HTML first. You opt in to interactivity component by component, and the JavaScript you ship grows with the number of islands, not the size of the page.

How it works in Astro

Astro is the best-known islands framework. Components render to HTML on the server and ship no JavaScript by default. A client: directive turns one into an island:

---
import Header from "../components/Header.astro";
import SearchBox from "../components/SearchBox.jsx";
import Reviews from "../components/Reviews.vue";
---
<Header />                          <!-- static HTML, no JS -->
<SearchBox client:load />           <!-- hydrate as soon as the page loads -->
<article>...</article>              <!-- static -->
<Reviews client:visible />          <!-- hydrate when scrolled into view -->

The directives choose when each island hydrates: client:load immediately, client:idle when the browser is idle, client:visible when the island enters the viewport, client:media when a media query matches, and client:only to skip server rendering and render in the browser only. Each island is a separate root, and islands can even use different UI frameworks (React, Preact, Vue, Svelte, Solid) on the same page.

client:visible is the same trick as lazy loading with IntersectionObserver: do nothing until the user can see it.

Astro also has server islands (server:defer), which let a static page leave a hole for personalised content, such as a user avatar, and fill it from the server after the main HTML is served. That keeps the page cacheable while the personal part stays dynamic.

Other frameworks with an islands model include Fresh for Deno and Eleventy's is-land component.

Partial, progressive and selective hydration

These terms get mixed up in interviews. Separate them by what they decide:

Term What it decides Does everything hydrate eventually?
Partial hydration Which parts hydrate at all No, static parts never do
Progressive hydration When each part hydrates, in priority order Yes
Selective hydration (React 18 and later) Hydrates Suspense boundaries independently and prioritises the one the user interacts with Yes
Islands Partial hydration where each interactive part is its own root with its own schedule No

So islands are partial hydration, usually combined with progressive timing (idle, visible). Selective hydration in React makes hydration non-blocking, but by default the whole tree is still client code that hydrates; see Suspense and streaming SSR.

Islands vs React Server Components

React Server Components reach a similar result from the other direction. In a framework like the Next.js App Router, components are server components by default: they render on the server and their code never reaches the browser. Only components marked "use client" ship JavaScript and hydrate. The client components behave a lot like islands.

The differences:

  • One tree, not many roots. An RSC page is still one React tree, so client components share context providers and the router. Astro islands are separate roots; to share state between them you use a small external store (Astro's docs suggest Nano Stores) rather than React context.
  • Navigation. RSC apps do client-side navigation by fetching a serialised server component payload and merging it into the live tree. Astro pages navigate as ordinary page loads by default, with optional view transitions.
  • Interleaving. In RSC, a server component can be passed as children into a client component. In Astro, a static Astro component can be slotted into an island in a similar way, but the island cannot import and render .astro components itself.
  • Fit. Islands suit content-heavy sites: docs, marketing, blogs, stores. RSC suits app-like products that need rich shared client state and fast in-app navigation.

The boundary rules are covered in server vs client components in Next.js and in depth in the React Server Components guide.

Resumability in one paragraph

Qwik takes a third route called resumability. Instead of re-running component code in the browser to rebuild state and attach listeners, the server serialises the state and the location of each event handler into the HTML. On the first interaction, Qwik downloads only the code for that handler and runs it. There is no hydration pass at all. The cost is a different programming model and many small lazy-loaded chunks, so the first interaction can wait on a network request unless the code was prefetched.

Trade-offs to mention

  • Props must be serialisable. Whatever the server passes to an island is written into the HTML, so no functions or class instances, and large props bloat the page.
  • Cross-island state is manual. Two islands that must stay in sync need a shared store or events.
  • Hydration timing affects input. A client:visible island that the user taps the moment it appears may not be ready. Hydrate above-the-fold controls eagerly.
  • Not for highly interactive apps. If most of the page is interactive, islands become one big island and the model adds little.

For choosing a rendering approach per route, see rendering strategies and practise with choose a rendering strategy per route for a marketplace.

Follow-up questions interviewers ask

Is islands architecture only an Astro thing?

No. It is a pattern: server-render static HTML and hydrate small independent widgets. You can build it by hand with server templates and a few hydrateRoot calls on separate containers, which is how many server-rendered sites added interactive widgets for years. Astro and Fresh make it the default.

Does an island still get server-rendered?

Usually yes. The island's HTML is rendered on the server so users see content before JavaScript loads, and then it hydrates. Astro's client:only is the exception: it renders nothing on the server.

How do islands affect Core Web Vitals?

Less JavaScript on the main thread generally helps INP and Total Blocking Time. LCP is often good because the main content is plain HTML. Watch for layout shift when an island renders something different from its placeholder.

How would you share a cart count between a header island and a product island?

Put the cart in a tiny framework-agnostic store that both islands subscribe to, and persist it to localStorage if it must survive reloads. Do not reach for a shared React context: the islands are separate roots.

Mistakes to avoid

  • Calling selective hydration "islands": React still hydrates the whole client tree

  • Marking every component as an island, which recreates the single-page app with extra overhead

  • Passing large objects as island props

  • Lazy-hydrating the main call to action so the first tap does nothing

Practise it in code

Interviewers rarely stop at the definition. These questions open in an editor with tests.

  1. Choose a rendering strategy per route for a marketplaceHard50 min
  2. Check React Server Component boundaries: missing 'use client', server-only imports in client code and non-serialisable propsHard50 min
  3. Stream a Server Components-style payload: $L placeholders, client references and out-of-order rowsHard60 min
  4. Lazy-load route components with React.lazy, preload on hover and retry failed chunksMedium40 min
  5. Implement useIntersectionObserver() for lazy loadingMedium35 min