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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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.5k
JavaScript & TypeScript 用のオールインワンツールキット「Bun」
semigura
0
300
OpenAPI, Storybook, Figma のワークフローを標準化してデザイナーとエンジニアのコラボレーションを促進する
semigura
2
2.3k
JavaScript パッケージマネージャー pnpm を使ってみる
semigura
0
87
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
240
DatoCMS + Next.js でプレビュー機能付きブログを作る
semigura
0
83
Other Decks in Programming
See All in Programming
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
520
20260514_its_the_context_window_stupid.pdf
heita
0
1k
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
460
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.7k
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
360
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
440
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
280
なぜあなたのコードには「コシ」がないのか?〜AI時代に問う、最後まで美味しい設計と戦略〜 #phpconkagawa / phpconkagawa2026
shogogg
0
210
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
3.1k
エラー処理の温故知新 / history of error handling technic
ryotanakaya
7
1.9k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
360
Programming with a DJ Controller — not vibe coding
m_seki
3
860
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
220
Utilizing Notion as your number one productivity tool
mfonobong
4
300
How to make the Groovebox
asonas
2
2.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
190
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Automating Front-end Workflow
addyosmani
1370
200k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
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