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
620
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Astro Islandsの 内部実装を 「日本で一番わかりやすく」 ざっくり解説!
Kenji
March 23, 2026
Transcript
20 slides
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で制御する。
おしまい
More Decks by Kenji
See All by Kenji
AstroとRustで考えるフロントエンドツールチェーンの今
knj
1
760
Other Decks in Technology
See All in Technology
gradle-best-practices 使ってみた
mikanichinose
0
200
AI対話型分析を作成し、リリースするまでの話 / The Road to Release: Buiding AI Conversational Analytics
yappli_developers
0
180
OCI Artifact による自動運転タクシーに向けた OTA 基盤の構築
biwashi
1
170
認知の質も文化醸成も。数年取り組んで見えてきた技術広報のKPI設計 / Tech PR KPIs: Lessons on Awareness Quality and Culture After Several Years
bitkey
PRO
0
140
高品質と高スピードを支える品質のシフトレフトのアプローチ
goyoki
4
1.7k
お風呂場をサーバルームにしよう
yusuke427
0
380
マネージャーをエスパーにしない マネジメントされる側から始める、働きやすい現場づくり
comi190327
1
830
Datadog の権限統制 〜Org 統合に向けて調べた注意点 / JDDUG-Meetup_24
visional_engineering_and_design
1
200
自動計装なしでECSサービスをApplication Signalsに載せるまで
ota1022
2
440
2026-11-16 JAWS-UG コンテナ支部 #31 ゆるLT大会 ECR のライフサイクルポリシーを いい感じに設定したい / ECR Lifecycle policy
masasuzu
3
580
HTTP QUERY時代の型安全な検索APIをKotlinで設計する
sansantech
PRO
1
110
マネジメントされる側の仕事は「文句」を言うこと
riyaamemiya
7
5.9k
Featured
See All Featured
Claude Code のすすめ
schroneko
67
230k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.7k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
480
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Abbi's Birthday
coloredviolet
5
11k
How STYLIGHT went responsive
nonsquared
100
6.4k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
380
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
The SEO Collaboration Effect
kristinabergwall1
1
620
Automating Front-end Workflow
addyosmani
1370
210k
Crafting Experiences
bethany
1
450