Performance: Why Islands architecture optimizes performance
HIGH IMPACT
Islands architecture improves page load speed and interaction responsiveness by reducing JavaScript and DOM work on initial load.
Use Islands architecture to render static HTML for the whole page and hydrate only small interactive islands separately as needed.
Render the entire page as a single large React or Astro component with all JavaScript bundled and hydrated at once.
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Single large hydrated app | High (deep tree) | Multiple reflows during hydration | High paint cost due to layout thrashing | [X] Bad |
| Islands architecture | Low (small islands) | Few reflows limited to islands | Lower paint cost, faster first paint | [OK] Good |