Revalidate content automatically with Incremental Static Regeneration (ISR).
Learn how to keep your headless content fresh in a Next.js app using Incremental Static Regeneration (ISR) and the revalidate tool. We'll walk through spinning up a demo Next.js app with headless WordPress, setting up our app to revalidate content, and building a serverless function to revalidate pages on-demand.
🧐 What's Inside
00:00 - Intro
00:17 - Tools we'll use including Next.js and Incremental Static Regeneration
03:28 - Starting a new Next.js app with headless WordPress
05:22 - Running a production build locally with next build and next start
07:03 - Configuring the revalidate property in getStaticProps to use Incremental Static Regeneration
11:10 - Setting new page routes to fallback to blocking to generate on the fly with ISR
14:16 - Triggering page content updates on-demand with a serverless function and Next.js revalidate method
18:45 - Outro
💾 Code
https://github.com/colbyfayock/my-fresh-blog
🗒️ Read More
https://spacejelly.dev/posts/how-to-update-static-content-in-next-js-automatically-with-incremental-static-regeneration-isr/
🔔 Subscribe for more tech and developer videos
https://www.youtube.com/colbyfayock?sub_confirmation=1
🐦 Get updates straight to your Twitter @colbyfayock
https://twitter.com/colbyfayock
📸 Catch the next stream live on Twitch @colbyfayock
https://twitch.tv/colbyfayock
✉️ Or a newsletter right to your inbox!
https://www.colbyfayock.com/newsletter/
💝 Sponsor me for more free content like this!
GitHub: https://github.com/sponsors/colbyfayock
Other: [email protected]
👨🚀 Brought to by colbyfayock.com
https://www.colbyfayock.com
🎥 Want to know what A/V equipment I use?
https://www.colbyfayock.com/uses
🧰 More Resources
Next.js WPGraphQL Basic Starter
https://github.com/colbyfayock/next-wpgraphql-basic-starter
Next.js Incremental Static Regeneration
https://nextjs.org/docs/basic-features/data-fetching/incremental-static-regeneration
Caching in Apollo Client
https://www.apollographql.com/docs/react/caching/overview
How to disable cache in apollo-link or apollo-client? on StackOverflow
https://stackoverflow.com/a/48549667/844780
🎼 Music
Music from Uppbeat (free for Creators!):
https://uppbeat.io/t/prigida/your-eyes
License code: VYDZW215SVLYC7PC
#colbyfayock #nextjs #headlesscms #wordpress #webdevelopment