Island
An independently interactive client root embedded in server-rendered or static HTML.
Lesson 06 · Advanced frontend rendering
Estimated time: about 14 minutes
An islands architecture serves most of a page as inert HTML and hydrates explicit interactive regions independently. Its unit of optimization is the interactive widget, not the route.
An independently interactive client root embedded in server-rendered or static HTML.
Only selected subtrees hydrate, instead of replaying one client runtime across the whole document.
A runtime prioritizes when parts of an already hydratable tree become interactive; it need not mean separate roots.
This content page has navigation, search, a gallery, and reviews. Switch architectures and observe the illustrative startup graph.
184 kB illustrative initial JS
One client root couples unrelated regions: simple navigation waits for the same startup as search and reviews.
An island can have HTML now while its code waits. Choose the trigger from interaction urgency and failure cost, not from a generic preference for laziness.
| Trigger | Good fit | Failure mode |
|---|---|---|
| Load immediately | Above-fold control likely to be used at once | Spends bandwidth and CPU even without interaction |
| Browser idle | Likely interaction after initial content settles | Idle time is not guaranteed; control may be tapped first |
| Visible | Below-fold carousel, chart, or editor preview | Late loading can miss a fast scroll or create a dead moment |
| Media/query | Capability or viewport-specific enhancement | Responsive state can change after initialization |
| Interaction | Rare, recoverable, non-critical enhancement | The first action pays network latency unless prefetched |
Mixed framework islands can repeat libraries, styles, and scheduling overhead. Count bytes after bundling, not component files.
Independent roots do not automatically share context. Prefer URL, server state, DOM events, or a deliberately shared client store.
Core navigation and forms should work before hydration where possible. A dormant island must not masquerade as a ready control.
Independent hydration can expose intermediate states. Define ownership for data freshness and cross-island updates.
Scenario: A documentation page is almost entirely prose. Search needs immediate keyboard interaction; an expensive playground appears below the fold; navigation uses ordinary links. Where does the client boundary begin?
Choose first. Name the code trigger, no-JS behavior, shared-state channel, and measurement plan.
Code splitting changes chunk delivery. Islands also define independent client roots and leave non-interactive page regions outside hydration.
Visibility can arrive before code, the first action may stall, observers have cost, and the region may be critical despite being below the fold.
Use durable shared channels such as the URL or server state, explicit DOM events, or a consciously shared client store.
Initial and interaction-triggered JavaScript, parse/evaluation time, time-to-interactive per island, first-interaction delay, duplicated dependencies, and no-JS behavior.
“I’d use islands when most of the page is content and interactivity is sparse. Each cohesive widget becomes an independent client root; ordinary links and read-only content remain HTML.”
“Hydration timing is a separate choice. Immediate controls load early, below-fold expensive widgets can wait for visibility, and core tasks retain progressive HTML behavior.”
“The tradeoff is coordination: roots need explicit state channels, bundles can duplicate runtimes, and the first interaction can pay lazy-load latency. I’d test those costs on representative devices.”
Use the client execution field guide to compare islands with hydration and resumability. Ask your teaching agent to partition a real page.
Short recall now helps decide what returns in your review queue.
Quick recall
Say your answer first, then reveal the explanation.
An independently interactive client root embedded in server-rendered or static HTML.
Quick recall
Say your answer first, then reveal the explanation.
This content page has navigation, search, a gallery, and reviews. Switch architectures and observe the illustrative startup graph.
Quick recall
Say your answer first, then reveal the explanation.
An island can have HTML now while its code waits. Choose the trigger from interaction urgency and failure cost, not from a generic preference for laziness.