Skip to content

Islands / partial hydration / lazy slices

Normally every interactive component on a page hydrates, so its JavaScript downloads and runs. Islands, deferred hydration, and server islands keep most of the page as plain HTML and hydrate (or render on demand) only the parts that need it. This merged row takes each framework's best label across the partial-hydration and server-island capabilities.

08 / 14Other featureOne of 7 features that do not affect first paint. Together they are worth 14 of the 28 points.

Labels across 23 frameworks

  • 1st-party15
  • Experimental5
  • Third-party0
  • Manual3
  • of 23

How to enable it, by framework

One card per framework, in the same order on every feature page. Where a framework has no built-in support (Manual), a short example shows how to build it yourself.

Next

1st-party2 ptsOverview

Server Components keep a component's JavaScript out of the browser (server and client components). Every Client Component still hydrates: no hydrate-on-visible/idle/never control is documented (next/dynamic with ssr: false is client-only rendering, not deferred hydration), although React hydrates each <Suspense> boundary as its own unit and prioritizes the one being interacted with (streaming guide). Enabling cacheComponents: true (the same flag as in section 4, enabled here) renders a cached shell and fills request-time holes. That is functionally close to a server island, but the API is an uncached data boundary inside Suspense, not a named island with its own cache entry.

Code example

Pages and layouts are Server Components by default and send no component JavaScript. Mark only the interactive part with 'use client'. That component still hydrates, but the rest of the page stays server-only.

// app/[id]/page.tsx (Server Component)
import LikeButton from '@/app/ui/like-button'
import { getPost } from '@/lib/data'

export default async function Page({ params }: { params: Promise<{ id: string }> }) {
  const { id } = await params
  const post = await getPost(id)
  return (
    <main>
      <h1>{post.title}</h1>
      <LikeButton likes={post.likes} />
    </main>
  )
}
// app/ui/like-button.tsx
'use client'

import { useState } from 'react'

export default function LikeButton({ likes }: { likes: number }) {
  // …
}

Source: Next.js: Server and Client Components

Nuxt

Experimental1 ptOverview

Documented lazy hydration (hydrate-on-visible, -on-idle, -on-interaction, -on-media-query, hydrate-never on Lazy* components, SFC only; on by default; the switch is experimental.lazyHydration) and features.noScripts / noScripts:

<template>
  <div>
    <LazyMyComponent hydrate-on-visible />
  </div>
</template>

Adapted from the components docs. Server components and islands stay experimental: server components and islands render a component with no client JS; prop changes refetch the island (<NuxtIsland>), and props travel as query parameters so island responses can be cached by a CDN. nuxt-client selective hydration works only on local .vue SFCs, and slots passed to nuxt-client components are server-rendered and not interactive.

No first-party islands are documented; all interactive components hydrate, though disabling hydration for a whole route is possible (page options):

export const csr = false;

From the page options docs.

SolidStart

Experimental1 ptOverview

No first-party islands are documented: released SolidStart v2 reserves experimental.islands and only accepts false (config reference). Solid 2's @solidjs/web has experimental server components (a component returned from a "use server" function and mounted with dynamicComponent; docs), not used by this port. clientOnly skips SSR for a single component, which is not islands.

Code example

Solid 2's experimental server components replace islands. A "use server" function returns a component, the client mounts it with dynamicComponent, and only the client components passed in as props or children hydrate. Turn it on with serverFunctions: { components: true } on @solidjs/vite-plugin.

// src/routes/story.tsx
import { dynamicComponent } from 'solid-js'

async function getStory(id: number) {
  'use server'
  const story = await db.stories.get(id)
  return (props) => (
    <article>
      <h1>{story.title}</h1>
      <footer>{props.children}</footer>
    </article>
  )
}

export default function StoryPage(props) {
  const Story = dynamicComponent(() => getStory(props.storyId))
  return (
    <Story>
      <ShareBar />
    </Story>
  )
}

Source: Solid: RFC 11, Server components (experimental)

<Hydrate when={visible()}> keeps the server HTML, splits the child into its own chunk, and defers hydration (load, idle, visible, media, interaction, condition, never).

import { Hydrate } from '@tanstack/react-start'
import { visible } from '@tanstack/react-start/hydration'

<Hydrate when={visible()}>
  <Reviews />
</Hydrate>

From the deferred hydration guide. <ClientOnly> is different: it skips SSR rather than deferring hydration. Experimental Server Components are also available via rsc: { enabled: true } and @vitejs/plugin-rsc. This port uses neither.

The same <Hydrate> from @tanstack/solid-start (guide); the usage mirrors the React snippet. That guide's prose is still copied from the React page, so its runtime behaviour is less proven. TanStack Start documents no Server Components for Solid. This port does not use <Hydrate>.

import { Hydrate } from '@tanstack/solid-start'
import { visible } from '@tanstack/solid-start/hydration'

<Hydrate when={visible({ rootMargin: '400px' })}>
  <Reviews />
</Hydrate>

From the Solid deferred hydration guide (component wrapper omitted; the page's prose still refers to React).

Pracht

1st-party2 ptsOverview

Set hydration: "islands" per route, with interactive components discovered from src/islands/; hydration: "none" gives a zero-JS page (islands).

route("/", "./routes/home.tsx", {
  render: "ssg",
  hydration: "islands",
});

Adapted from the islands docs. server islands render a fragment per request with cookies and middleware context while the surrounding page stays SSG/ISG. This port sets neither, so it uses full hydration.

Waku

1st-party2 ptsOverview

lazy slices are documented as similar to Astro's server islands. There is no partial hydration.

<Slice id="two" lazy fallback={<p>Two is loading...</p>} />

Adapted from the Waku docs.

Ember

Manual0 ptsOverview

Nothing to enable: no first-party partial hydration is documented; SSR is app-wide (community vite-ember-ssr here; official FastBoot).

Code example

Serve the page with a small entry instead of app/entry.js. Then mount each interactive component into its placeholder with renderComponent from @ember/renderer. The rest of the page stays static HTML.

// app/islands.js (the only <script type="module"> on a static page)
import { renderComponent } from '@ember/renderer';
import FavoriteButton from './components/islands/favorite-button';

const islands = { 'favorite-button': FavoriteButton };

for (const el of document.querySelectorAll('[data-island]')) {
  const args = JSON.parse(el.dataset.args ?? '{}');
  el.replaceChildren(); // no hydration: drop the server markup, then render fresh
  renderComponent(islands[el.dataset.island], { into: el, args });
}

// app/components/islands/favorite-button.gjs
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { on } from '@ember/modifier';

export default class FavoriteButton extends Component {
  @tracked saved = false;
  toggle = () => (this.saved = !this.saved);
  <template>
    <button type="button" {{on "click" this.toggle}}>
      {{if this.saved "Saved" "Save"}} {{@title}}
    </button>
  </template>
}

Source: RFC 1099: renderComponent

Astro

1st-party2 ptsOverview

Zero client JS by default; client:load, client:idle, client:visible, client:media, client:only. server:defer server islands need an adapter; props travel in an encrypted query string. Server islands were experimental in astro@4.12 (experimental.serverIslands) and the flag was removed in astro@5.0, where the feature is available without it; the guide carries no experimental label. (islands, framework-components, server-islands, upgrade-to/v5, astro-4120)

Code example

Components render to HTML with no client JS unless a client:* directive hydrates them. server:defer turns an Astro component into a server island that renders after the page, with fallback content until it arrives.

---
// src/pages/index.astro
import Counter from '../components/Counter.jsx';
import Avatar from '../components/Avatar.astro';
import GenericAvatar from '../components/GenericAvatar.astro';
---
<Counter client:visible />

<Avatar server:defer>
  <GenericAvatar slot="fallback" />
</Avatar>

Source: Astro: Server islands

React Router

Experimental1 ptOverview

Experimental RSC (React 19+): unstable_reactRouterRSC from @react-router/dev/vite plus experimental @vitejs/plugin-rsc; unstable_-prefixed and still unstable in 8.5.2. No islands or partial-hydration primitive documented. splitRouteModules only splits client exports. (react-server-components, code-splitting)

Code example

Swap reactRouter() for the unstable RSC plugin and add @vitejs/plugin-rsc after it. Route modules then render as React Server Components, and only 'use client' modules ship JavaScript.

// vite.config.ts
import { defineConfig } from 'vite'
import { unstable_reactRouterRSC as reactRouterRSC } from '@react-router/dev/vite'
import rsc from '@vitejs/plugin-rsc'

export default defineConfig({
  plugins: [reactRouterRSC(), rsc()],
})

Source: React Router: React Server Components

Qwik City

1st-party2 ptsOverview

Resumability: no hydration step; state and listeners are serialized in HTML and handler chunks load lazily. The FAQ says Qwik does not use partial hydration (islands). qwikify$ (@builder.io/qwik-react) gives React islands with client:visible/client:idle. (resumable, faq, react)

Code example

Qwik components do not hydrate. The click handler below is serialized into the HTML and its code chunk loads on the first click. React components can still run as islands through qwikify$ with a client:* prop.

// src/components/counter/counter.tsx
import { component$, useSignal } from '@builder.io/qwik'

export const Counter = component$(() => {
  const count = useSignal(0)
  // no JS runs until the first click; then only this handler loads
  return <button onClick$={() => count.value++}>Increment {count.value}</button>
})
// src/integrations/react/slider.tsx
/** @jsxImportSource react */
import { qwikify$ } from '@builder.io/qwik-react'
import { Slider } from '@mui/material'

export const MUISlider = qwikify$(Slider)
// usage in a Qwik component: <MUISlider client:visible />

Source: Qwik: Resumable, Qwik: React integration

Angular (SSR)

1st-party2 ptsOverview

Incremental hydration via @defer with hydrate on idle/viewport/interaction/hover/immediate/timer/when and hydrate never; the v22 guide says it is enabled by default with provideClientHydration(). Stable since v20 per the roadmap (developer preview in v19), and on by default since v22.0.0, when withIncrementalHydration was deprecated (withIncrementalHydration); the v22 guide pages carry no stability label. (incremental-hydration, hydration)

Code example

Incremental hydration is on by default with provideClientHydration(). A @defer block with a hydrate trigger renders on the server and stays dehydrated until the trigger fires.

// src/app/app.config.ts
providers: [provideClientHydration()],
<!-- src/app/pages/book.page.ts template -->
<app-book-detail [book]="book()" />

@defer (hydrate on viewport) {
  <app-related-books [bookId]="book().id" />
}

@defer (on viewport; hydrate never) {
  <app-static-footer />
}

Source: Angular: Incremental hydration

Marko

1st-party2 ptsOverview

Zero JS by default; the compiler ships only interactive code and the client resumes instead of re-running templates; import X from "<tag>" with { load: "visible#hero" } defers a tag bundle. The docs describe an islands-like result without a server/client component split. (fine-grained-bundling, why-is-marko-fast, lazy-loading)

Code example

Interactive code ships by default only for tags with client state or handlers. To delay one tag's JS further, import it with a load trigger. The server still renders its HTML; the browser fetches the bundle when #reviews scrolls into view.

// src/routes/$id/+page.marko
import BookReviews from "<book-reviews>" with { load: "visible#reviews?rootMargin=200px" }

<book-detail book=$global.data.book/>

<section id="reviews">
  <BookReviews bookId=$global.data.book.id/>
</section>

Source: Marko: Lazy loading

Fresh

1st-party2 ptsOverview

Islands are the core model: only island JS ships and bundles are code-split; files live in islands/ or (_islands); props must be serializable. No lazy/idle/visible hydration timing is documented; Preact lazy() + <Suspense> is documented for code-splitting an island. (islands, architecture, common-patterns)

Code example

Any component in islands/ ships JS; everything else renders to HTML only. In the Books port the layout is server-only, and just the search box and the mobile drawer hydrate.

// routes/_layout.tsx
import BookSearch from '@/islands/BookSearch.tsx';
import MobileSidebar from '@/islands/MobileSidebar.tsx';
import MobileSidebarTrigger from '@/islands/MobileSidebarTrigger.tsx';
import { define } from '../utils.ts';

export default define.layout(function Layout({ Component, url }) {
  const current = searchParamsFromUrl(url.searchParams);
  return (
    <>
      <MobileSidebar pathname={url.pathname}>
        {/* server-rendered children passed into an island */}
        <BookSidebar current={current} idPrefix="mobile" mobile />
      </MobileSidebar>
      <header>
        <MobileSidebarTrigger />
        <BookSearch current={current} />
      </header>
      <main><Component /></main>
    </>
  );
});

Source: Fresh: Islands

Analog

1st-party2 ptsOverview

Angular incremental hydration: @defer (hydrate on viewport | idle | interaction | immediate) blocks, enabled with provideClientHydration(withIncrementalHydration()) on Angular 21 and by default on Angular 22. Analog's streaming SSR page builds on it; streaming itself is experimental (experimental.streaming). (streaming-ssr, incremental-hydration)

Code example

Enable incremental hydration, then wrap a part of the page in @defer with a hydrate trigger. It renders on the server and hydrates when it scrolls into view.

// src/app/app.config.ts (Angular 21; on by default with provideClientHydration() from Angular 22)
import { provideClientHydration, withIncrementalHydration } from '@angular/platform-browser';
// providers: [provideClientHydration(withIncrementalHydration()), /* … */]

// src/app/pages/books/[id].page.ts
import { Component, signal } from '@angular/core';
import { Reviews } from '../../reviews/reviews';

@Component({
  imports: [Reviews],
  template: `
    <h1>{{ title() }}</h1>
    @defer (hydrate on viewport) {
      <app-reviews />
    } @placeholder {
      <div>Reviews</div>
    }
  `,
})
export default class BookPage {
  protected title = signal('Dune');
}

Source: Angular: Incremental hydration, Analog: Streaming SSR

Vike

Manual0 ptsOverview

No islands or partial hydration documented. <ClientOnly> renders a component in the browser only, which is client-only rendering. The React Server Components extension vike-react-rsc is listed as work in progress (npm 0.0.0) and is not credited. (ClientOnly, extensions)

Code example

Make the page HTML-only so it ships no page JavaScript. Then +client.tsx, the page's only browser code, hydrates each marked component by hand.

// renderer/+config.ts
export default {
  meta: { Page: { env: { server: true, client: false } } }, // HTML-only
}

// pages/about/+Page.tsx (server only)
<div data-island="like" data-props={JSON.stringify({ bookId })}>
  <LikeButton bookId={bookId} />
</div>

// pages/about/+client.tsx
import { hydrateRoot } from 'react-dom/client'
import { LikeButton } from '../../components/LikeButton'

for (const el of document.querySelectorAll<HTMLElement>('[data-island="like"]')) {
  hydrateRoot(el, <LikeButton {...JSON.parse(el.dataset.props!)} />)
}

Source: Vike: Render Modes · Vike: +client.js

RedwoodSDK

1st-party2 ptsOverview

React Server Components are the default; only components marked "use client" ship JavaScript and hydrate. (react-server-components)

Code example

Pages are server components by default and send no JavaScript. Only the component marked "use client" ships code and hydrates.

// src/app/components/LikeButton.tsx
"use client";
import { useState } from "react";

export function LikeButton() {
  const [likes, setLikes] = useState(0);
  return <button onClick={() => setLikes(likes + 1)}>Like ({likes})</button>;
}

// src/app/pages/BookPage.tsx (server component, no client JS of its own)
import { LikeButton } from "@/app/components/LikeButton";

export async function BookPage({ params }) {
  const book = await getBook(params.id);
  return (
    <article>
      <h1>{book.title}</h1>
      <p>{book.description}</p>
      <LikeButton />
    </article>
  );
}

Source: RedwoodSDK: React Server Components

Remix 3

1st-party2 ptsOverview

Pages are server-rendered HTML; only components wrapped in clientEntry(import.meta.url, Component) hydrate. <Frame src="..." fallback={...}> streams a server-rendered region into the page and can load it lazily. (interactivity, streaming-ui-with-frames)

Code example

Pages are server HTML. Only a component wrapped in clientEntry(import.meta.url, ...) is loaded and hydrated in the browser, with its props serialized into the page.

// app/actions/books/public/add-to-cart.tsx
import { clientEntry, on } from "remix/component";
import type { Handle } from "remix/component";

export const AddToCart = clientEntry(
  import.meta.url,
  function AddToCart(handle: Handle<{ bookId: string }>) {
    let added = false;
    return () => (
      <button
        type="button"
        mix={on("click", () => {
          added = true;
          handle.update();
        })}
      >
        {added ? "Added" : "Add to cart"}
      </button>
    );
  },
);

Source: Remix: Interactivity, hydration boundaries with clientEntry

Void (React)

1st-party2 ptsOverview

Name a page *.island.tsx and import interactive components with import Counter from './_Counter' with { island: 'load' }. The strategies are load, visible, idle and media:(query). Components imported without the attribute ship no JavaScript. Island pages have no client router (full-page navigation), and island pages without a loader are prerendered automatically. (islands)

Code example

Name the page *.island.tsx and import each interactive component with an island import attribute. Components imported without it render to HTML and ship no JavaScript. Island pages have no client router.

// pages/about.island.tsx
import Counter from './_counter' with { island: 'visible' } // load | visible | idle | media:(query)
import StaticNote from './_static-note'

export default function About() {
  return (
    <main>
      <StaticNote />
      <Counter />
    </main>
  )
}

Source: Void: Islands

Void (Vue)

1st-party2 ptsOverview

Name a page *.island.vue and import interactive components with import Counter from './_Counter' with { island: 'load' }. The strategies are load, visible, idle and media:(query). Components imported without the attribute ship no JavaScript. Island pages have no client router (full-page navigation), and island pages without a loader are prerendered automatically. (islands)

Code example

Name the page *.island.vue and import each interactive component with an island import attribute. Components imported without it render to HTML and ship no JavaScript. Island pages have no client router.

<!-- pages/about.island.vue -->
<script setup lang="ts">
import Counter from './_Counter.vue' with { island: 'visible' } // load | visible | idle | media:(query)
import StaticNote from './_StaticNote.vue'
</script>

<template>
  <main>
    <StaticNote />
    <Counter />
  </main>
</template>

Source: Void: Islands

Void (Svelte)

1st-party2 ptsOverview

Name a page *.island.svelte and import interactive components with import Counter from './_Counter' with { island: 'load' }. The strategies are load, visible, idle and media:(query). Components imported without the attribute ship no JavaScript. Island pages have no client router (full-page navigation), and island pages without a loader are prerendered automatically. (islands)

Code example

Name the page *.island.svelte and import each interactive component with an island import attribute. Components imported without it render to HTML and ship no JavaScript. Island pages have no client router.

<!-- pages/about.island.svelte -->
<script lang="ts">
  import Counter from './_Counter.svelte' with { island: 'visible' } // load | visible | idle | media:(query)
  import StaticNote from './_StaticNote.svelte'
</script>

<main>
  <StaticNote />
  <Counter />
</main>

Source: Void: Islands

Void (Solid)

1st-party2 ptsOverview

Name a page *.island.tsx and import interactive components with import Counter from './_Counter' with { island: 'load' }. The strategies are load, visible, idle and media:(query). Components imported without the attribute ship no JavaScript. Island pages have no client router (full-page navigation), and island pages without a loader are prerendered automatically. (islands)

Code example

Name the page *.island.tsx and import each interactive component with an island import attribute. Components imported without it render to HTML and ship no JavaScript. Island pages have no client router.

// pages/about.island.tsx
import Counter from './_counter' with { island: 'visible' } // load | visible | idle | media:(query)
import StaticNote from './_static-note'

export default function About() {
  return (
    <main>
      <StaticNote />
      <Counter />
    </main>
  )
}

Source: Void: Islands

Gotchas

  • <ClientOnly> and clientOnly skip server rendering; they are not deferred hydration.