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
Netlify で Next.js の ISR (Incremental Static Reg...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
semigura
January 27, 2022
Programming
440
0
Share
Netlify で Next.js の ISR (Incremental Static Regeneration) を使う
2022.1.27 ジャムジャム!!Jamstack_4【初心者歓迎LT大会】
semigura
January 27, 2022
More Decks by semigura
See All by semigura
MUI v6, v7 が2024年にリリースされるので新機能を調べてみた
semigura
4
5.4k
JavaScript & TypeScript 用のオールインワンツールキット「Bun」
semigura
0
300
OpenAPI, Storybook, Figma のワークフローを標準化してデザイナーとエンジニアのコラボレーションを促進する
semigura
2
2.2k
JavaScript パッケージマネージャー pnpm を使ってみる
semigura
0
86
MUIのオススメコンポーネント5選
semigura
0
280
react-beautiful-dnd でドラッグ&ドロップが可能なリストコンポーネントを作成する
semigura
0
190
Material-UI から MUI へ 〜Material-UI v4 から v5への移行手引き〜
semigura
0
470
ユニークな React 用UIフレームワーク「Mantine」を推したい
semigura
0
230
DatoCMS + Next.js でプレビュー機能付きブログを作る
semigura
0
83
Other Decks in Programming
See All in Programming
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
5k
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
790
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
190
Liberating Ruby's Parser from Lexer Hacks
ydah
2
1.3k
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
130
おれのAgentic Coding 2026/03
tsukasagr
1
150
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
410
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
130
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
370
実用!Hono RPC2026
yodaka
2
230
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
250
How Swift's Type System Guides AI Agents
koher
0
270
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
The browser strikes back
jonoalderson
0
980
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
110
Ethics towards AI in product and experience design
skipperchong
2
260
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
330
The Limits of Empathy - UXLibs8
cassininazir
1
300
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.4k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
100
How STYLIGHT went responsive
nonsquared
100
6.1k
RailsConf 2023
tenderlove
30
1.4k
Transcript
Netlify Ͱ Next.js ͷ ISR (Incremental Static Regeneration) Λ͏ ੴ֞ଠ
@semigura 2022.1.27 δϟϜδϟϜʂʂJamstack_4ʲॳ৺ऀܴLTେձʳ
ੴ֞ɹଠ twitter: @semigura • גࣜձࣾGaji-Laboʹ2018͔Βॴଐ • React, TypeScript, Next.js
ΛۀͰѻ͍ͬͯ·͢ • Netlify CMS + GatsbyJS ߏͷ ίʔϙϨʔταΠτͷ࣮पΓ୲ • Headless CMSΛ৮Δͷ͕झຯ • ೣͱԻָ͕͖ Netlify Ͱ Next.js ͷ ISR (Incremental Static Regeneration) Λ͏
Netlify Ͱ Next.js ͷ ISR (Incremental Static Regeneration) Λ͏ 1.
ISR (Incremental Static Regeneration) ͱʁ 2. ࣮ࡍʹ Netlify Ͱ ISR ΛͬͯΈΔ ࠓճͷςʔϚ Netlify Ͱ Next.js ͷ ISR (Incremental Static Regeneration) Λ͏
ISR (Incremental Static Regeneration) ͱʁ • Next.js ͷػೳͷҰͭͰɺSSG, SSR ͷརΛ͔͚߹ΘͤͨϏϧυํ๏
• ϖʔδϦΫΤετͷ࣌ʹ੩తͳϖʔδΛੜͯ͠ʢSSGʣɺͦΕΛΩϟογϡͭͭ͠αʔ όʔଆͰߋ৽͢ΔʢSSRʣ • getStaticProps ΛͬͯϖʔδੜΛ͢ΔͷͷɺSSGͷΑ͏ʹॳճϏϧυͰશͯͷϖʔδ Λੜ͢ΔͷͰͳ͘ɺϦΫΤετ࣌ʹϖʔδΛੜˍαʔόʔଆʹΩϟογϡ͢Δ • 2ճҎ߱ͰΩϟογϡ͞ΕͨσʔλΛฦͭͭ࣍͠ͷΞΫηεʹ͚ͯΩϟογϡ͕SSR Ͱ࠶ੜ͢Δ • https://nextjs.org/docs/basic-features/data-fetching/incremental-static-regeneration Netlify Ͱ Next.js ͷ ISR (Incremental Static Regeneration) Λ͏
ISR Λ͏ͱԿ͕͍͍͔ʁ • ϦΫΤετ͕͔͋ͬͯΒϖʔδੜ͞ΕΔͨΊɺSSGͱҧͬͯαΠτ ΛશͯϏϧυ͠ͳ͍ʹॳճͷϏϧυ͕࣌ؒॖ͞ΕΔ • SSRͨ͠ϖʔδ͕ฦͬͯ͘ΔͷͰද͕ࣔߴ • Ϗϧυ͢Δ͜ͱͳ͘ϖʔδΛߋ৽͢Δ͜ͱ͕Ͱ͖Δ •
SSG, SSRͷڧΈΛ͔͚߹Θͤͨͷ Netlify Ͱ ISR (Incremental Static Regeneration) Λ͏
શରԠ Vercel ͷΈ ↓ ࠷ۙʹͳͬͯ Netlify શରԠʂ ʢ2021/12/14ʣ Netlify
Ͱ ISR (Incremental Static Regeneration) Λ͏
࣮ࡍʹ Netlify Ͱ ISR ΛͬͯΈΔ Jamstack αΠτͷ४උ ࢀߟ: https://blog.microcms.io/microcms-next-jamstack-blog/ Netlify
Ͱ ISR (Incremental Static Regeneration) Λ͏
࣮ࡍʹ Netlify Ͱ ISR ΛͬͯΈΔ ·ͣී௨ʹϏϧυ • ԿઃఆͤͣʹϏϧυ •
ॴཁ࣌ؒɿ1m 23s Netlify Ͱ ISR (Incremental Static Regeneration) Λ͏
࣮ࡍʹ Netlify Ͱ ISR ΛͬͯΈΔ ISR Λ༗ޮʹ͢Δ • getStaticProps
ʹ revalidate Λઃఆ͢Δ Netlify Ͱ ISR (Incremental Static Regeneration) Λ͏ • revalidate ͷɺΩϟογϡΛੜ͔ͯ͠Β࠶ੜ͢Δ·Ͱͷ࣌ؒ
࣮ࡍʹ Netlify Ͱ ISR ΛͬͯΈΔ ISR Λ༗ޮʹͯ͠Ϗϧυ • ॴཁ࣌ؒɿ1m
23s → 57s Netlify Ͱ ISR (Incremental Static Regeneration) Λ͏
·ͱΊˍײ • ISR SSG, SSR ͷརΛ͔͚߹ΘͤͨϏϧυํ๏ • getStaticPropsʹ1ߦ͚ͩ͢Ͱ ISR
ʹରԠͰ͖ΔͷͰָʹ࣮Ͱ͖Δ • ॳճϏϧυͰશϖʔδੜ͠ͳ͍ͷͰϏϧυ͕࣌ؒॖͰ͖Δʢˠα Πτͷن͕େ͖͍΄ͲϝϦοτ͕େ͖͘ͳΔʣ • Vercel ͚ͩͰͳ͘ Netlify શରԠͨ͜͠ͱͰɺJamstack ߏͷબ ࢶ͕͕Γͦ͏ Netlify Ͱ ISR (Incremental Static Regeneration) Λ͏
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ
גࣜձࣾGaji-LaboͰݱࡏϑϩϯτΤϯυΤϯδχΞΛืू͍ͯ͠·͢ʂʂ React, TypeScript, Next.js ɺϞμϯͳϑϩϯτΤϯυٕज़Ͱࣄۀձࣾʹߩݙͯ͠Έ͍ͨํɺΧ δϡΞϧʹҰ͓ͯ͠Έ·ͤΜ͔ʁ Website: https://www.gaji.jp/ Twitter: @gaji_labo
Wantedly: https://www.wantedly.com/companies/gaji