Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Astro Islandsの 内部実装を 「日本で一番わかりやすく」 ざっくり解説!
Search
Kenji
March 23, 2026
Technology
590
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Astro Islandsの 内部実装を 「日本で一番わかりやすく」 ざっくり解説!
Kenji
March 23, 2026
More Decks by Kenji
See All by Kenji
AstroとRustで考えるフロントエンドツールチェーンの今
knj
1
310
Other Decks in Technology
See All in Technology
野良MCPサーバーを排除せよ!MCPサーバーのガバナンス
yukiogawa
1
150
AI導入は済んだ。次は統制を作り替える番だ_AI×開発組織 Summit 2026
techtekt
PRO
0
500
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
370
AI × アーキテクト 第1・2章|生成AIの課題とアーキテクトの素養
daidaidai
1
230
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
7
5.3k
Claude Code on Bedrock で統制をかける小ネタ集/claude-code-bedrock-governance-tips
emiki
1
160
AWS DevOps Agentはどこまで任せられるか 〜機能の現在地と、機能拡張の実践〜
nyankotaro
0
110
ストレスなくAIと付き合いたい!こんなときどうしてる?
namiki64
4
660
PHPカンファレンス関西の招待状 / Invitation to PHP Conference Kansai
ykanoh
0
220
顧客価値を追いかけたら、プライシングにたどり着いた
sansantech
PRO
2
400
AI駆動開発における開発環境のセキュリティの考え方
yamahiro
0
300
AI駆動開発におけるハーネスエンジニアリングの勘所
tsukuboshi
1
480
Featured
See All Featured
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
220
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
WENDY [Excerpt]
tessaabrams
14
40k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
420
Building the Perfect Custom Keyboard
takai
2
910
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
370
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
What's in a price? How to price your products and services
michaelherold
247
13k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
580
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Transcript
Astro Islandsの 内部実装を 「日本で一番わかりやすく」 ざっくり解説! Version 1.0 March, 2026
ちなみに「世界で一番わかりやすい」のは Navigating Islands of Interactivity Reuben Tier — React Summit
2025 今日は「日本で一番」をやります
ケンジ Bluesky : jp-knj GitHub : jp-knj
ウェブの普遍的な パターンの話
ウェブは昔からずっと 似たような構造を繰り返している PHP サーバーがHTML生成 Astro Component Server Component ビルド時にHTML生成 サーバーで実行
+ + + jQuery Plugin Client Component Island
だいたい、 クライアントとサーバサイドの境界を コンポーネント単位で決めれる みたいな話 でも、前提が違ったりする
Nuxt Astro 前提がSPAで、引き算としてのアプローチ → 前提がMPAで、足し算としてのアプローチ →
Astro 構成として Astro Component Client Island Server Island
Client Islandは この足し算の中で 何が起きているのか?
ビルドタイムでコンパイラが .astroファイルの中でIslandを見つける client:* なし client:* あり 静的HTML JS ゼロ Island
として抽出 STEP 01 Props シリアライズ STEP 02 コード分割 STEP 03 <astro-island>
Propsのシリアライズ Server JavaScript オブジェクト Browser HTML属性の文字列 { } count: 1,
date: new Date(...), items: new Set([1,2]), tags: new Map([...]) props=' {"count": [0, 1], "date": [2, "2025-..."], "items": [4, [[0,1], [0,2]]], "tags": [5, [...]] }' → devalue by Rich Harris(Svelte作者)
Viteによるコード分割 index.html 静的HTML Page.astro <Header /> → Counter.BxK3q.js コンポーネント本体 Search.Dm2r8.js
コンポーネント本体 <Counter client:visible /> <Search client:idle /> <Footer /> client.Fj7nP.js レンダラー共有
<astro-island> でラッピング <body> <header>My Site</header> <astro-island component-url="/_astro/Counter.BxK3q.js" renderer-url="/_astro/client.Fj7nP.js" props='{"count":[0,1]}' client="visible">
<div>0</div> </astro-island> <footer>© 2025</footer> </body>
Astro Islandは Web Components class AstroIsland extends HTMLElement customElements.define('astro-island', AstroIsland)
Astro Island はなぜ、Web Components なのか?
ちょうどいい仕組みだから Astroが使うのは Custom Elements API だけ Web Components Custom Elements
Shadow DOM HTML Templates connectedCallback ブラウザが勝手に呼んでくれる → hydration の起点
Astro Islandの内部 connectedCallback() this.getAttribute('client') "load" 即座に実行 "idle" "visible" "media" matchMedia
IdleCallback request Intersection Observer 条件を満たしたら import(renderer-url) fetch renderer → hydrate import(component-url) fetch component
だいたい "ブラウザが持っている力" Astroのランタイムは本当に短い。
HTMLはそのままで十分強い Polymer → Astro
Astroは HTMLをそのまま活かして、 JSを足すタイミングだけを Web Componentsで制御する。
おしまい