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
AgentCoreとLINEを使った飲食店おすすめアプリを作ってみた
yakumo
2
150
Phase02_AI座学_応用
overflowinc
0
1k
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
Windows ファイル共有(SMB)を再確認する
murachiakira
PRO
0
210
「お金で解決」が全てではない!大規模WebアプリのCI高速化 #phperkaigi
stefafafan
4
2.1k
Agent Skill 是什麼?對軟體產業帶來的變化
appleboy
0
170
頼れる Agentic AI を支える Datadog のオブザーバビリティ / Powering Reliable Agentic AI with Datadog Observability
aoto
PRO
0
250
VLAモデル構築のための AIロボット向け模倣学習キット
kmatsuiugo
0
310
事例から紐解くSHIFT流QA支援 ~大規模プロジェクトの品質管理支援、QA組織立ち上げ~ / 20260320 Nozomu Koketsu
shift_evolve
PRO
0
110
エンジニアリングマネージャーの仕事
yuheinakasaka
0
120
欠陥分析(ODC分析)における生成AIの活用プロセスと実践事例 / 20260320 Suguru Ishii & Naoki Yamakoshi & Mayu Yoshizawa
shift_evolve
PRO
0
250
SLI/SLO 導入で 避けるべきこと3選
yagikota
0
140
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
160
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
410
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
110
Design in an AI World
tapps
0
180
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
130
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
180
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
330
Test your architecture with Archunit
thirion
1
2.2k
The Curious Case for Waylosing
cassininazir
0
270
Context Engineering - Making Every Token Count
addyosmani
9
770
Agile that works and the tools we love
rasmusluckow
331
21k
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で制御する。
おしまい