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
550
Other Decks in Technology
See All in Technology
これだけは抑えておきたい!後悔しない re:Invent の過ごし方 / AWS re:Invent 2026 prestudy
kinunori
2
460
ドメインエキスパートは いかにして AI を使って プロダクト開発をするか
tatsuyashiraishi
1
220
ポケモン対戦を自動で記録して振り返ろう
fufufukakaka
0
410
Claude Codeから見る、エンジニアの世界の変容とその先
oikon48
7
4.5k
E2Eってつらくないですか?E2Eの管理コストを下げる手段とその実践
akaboshinit
5
2.4k
AWS Continuum for Penetration Testing に Deep Dive してみる
asanoharuki
2
1.4k
Vue で書く 空間コンピューティング、TresJS と WebXR を使ったXR デバイスのフロントエンド開発
hiranuma
0
110
reInvent2026stby LT00 "Change your life!"
shinichirokawano
1
350
Obsidian Vault Architectures
x5gtrn
PRO
0
190
How we choose session proposals
kawaguti
PRO
1
180
AIコーディングを実践してきた1年を振り返る / Looking Back on a Year of Practicing AI Coding
takedatakashi
1
150
AIをリアル世界に解き放つ 〜M5Stack×AIであなたのアイディアを手の平に〜
hamadakoji
1
570
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
580
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.4k
The Curse of the Amulet
leimatthew05
3
16k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Cult of Friendly URLs
andyhume
79
7k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
2
950
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
800
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Discover your Explorer Soul
emna__ayadi
2
1.3k
Typedesign – Prime Four
hannesfritz
42
3.2k
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で制御する。
おしまい