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
0
420
Netlify で Next.js の ISR (Incremental Static Regeneration) を使う
2022.1.27 ジャムジャム!!Jamstack_4【初心者歓迎LT大会】
semigura
January 27, 2022
Tweet
Share
More Decks by semigura
See All by semigura
MUI v6, v7 が2024年にリリースされるので新機能を調べてみた
semigura
4
5.4k
JavaScript & TypeScript 用のオールインワンツールキット「Bun」
semigura
0
290
OpenAPI, Storybook, Figma のワークフローを標準化してデザイナーとエンジニアのコラボレーションを促進する
semigura
2
2.2k
JavaScript パッケージマネージャー pnpm を使ってみる
semigura
0
75
MUIのオススメコンポーネント5選
semigura
0
260
react-beautiful-dnd でドラッグ&ドロップが可能なリストコンポーネントを作成する
semigura
0
180
Material-UI から MUI へ 〜Material-UI v4 から v5への移行手引き〜
semigura
0
450
ユニークな React 用UIフレームワーク「Mantine」を推したい
semigura
0
210
DatoCMS + Next.js でプレビュー機能付きブログを作る
semigura
0
79
Other Decks in Programming
See All in Programming
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
240
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
110
Claude Code Skill入門
mayahoney
0
390
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
150
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
220
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
220
技術検証結果の整理と解析をAIに任せよう!
keisukeikeda
0
120
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
340
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
300
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
270
Windows on Ryzen and I
seosoft
0
290
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
530
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Done Done
chrislema
186
16k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
160
Into the Great Unknown - MozCon
thekraken
40
2.3k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
Test your architecture with Archunit
thirion
1
2.2k
The untapped power of vector embeddings
frankvandijk
2
1.6k
Embracing the Ebb and Flow
colly
88
5k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
170
Design in an AI World
tapps
0
170
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
150
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