Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Astro Islandsの 内部実装を 「日本で一番わかりやすく」 ざっくり解説!
Search
Wu Kenji
March 23, 2026
Technology
0
110
Astro Islandsの 内部実装を 「日本で一番わかりやすく」 ざっくり解説!
Wu Kenji
March 23, 2026
Tweet
Share
Other Decks in Technology
See All in Technology
テストプロセスにおけるAI活用 :人間とAIの共存
hacomono
PRO
0
120
Agent Skill 是什麼?對軟體產業帶來的變化
appleboy
0
170
DDD×仕様駆動で回す高品質開発のプロセス設計
littlehands
3
1.5k
visionOS 開発向けの MCP / Skills をつくり続けることで XR の探究と学習を最大化
karad
1
1.2k
Kiro Powers 入門
k_adachi_01
0
130
The Rise of Browser Automation: AI-Powered Web Interaction in 2026
marcthompson_seo
0
240
楽しく学ぼう!ネットワーク入門
shotashiratori
1
500
"作る"から"使われる"へ:Backstage 活用の現在地
sbtechnight
0
230
エンジニアリングマネージャーの仕事
yuheinakasaka
0
120
欠陥分析(ODC分析)における生成AIの活用プロセスと実践事例 / 20260320 Suguru Ishii & Naoki Yamakoshi & Mayu Yoshizawa
shift_evolve
PRO
0
250
Phase08_クイックウィン実装
overflowinc
0
590
Phase11_戦略的AI経営
overflowinc
0
510
Featured
See All Featured
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.9k
Context Engineering - Making Every Token Count
addyosmani
9
770
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
420
AI: The stuff that nobody shows you
jnunemaker
PRO
3
460
Everyday Curiosity
cassininazir
0
170
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.2k
SEO for Brand Visibility & Recognition
aleyda
0
4.4k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
WENDY [Excerpt]
tessaabrams
9
37k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
230
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
200
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で制御する。
おしまい