✨Discover storytelling in the AI age with Pixar's Matthew Luhn at Sanity Connect, May 8th—register now

Discussion on using ISR and revalidation in Next.js to update content changes in Sanity Studio

13 replies
Last updated: Jan 7, 2021
Do you get any warnings or error on building.
Jan 7, 2021, 11:10 AM
no, it deploys perfectly... but when I make changes in the studio it is not updated
Jan 7, 2021, 11:15 AM
You probably need to enable revalidation, otherwise Next.js will keep serving your data it retrieved on build.
Jan 7, 2021, 11:18 AM
In local (develop mode) getStaticProps will fetch the data every time you load or change the page.
Jan 7, 2021, 11:19 AM
you probably need to add a webhook to trigger rebuild on content publish
Jan 7, 2021, 11:19 AM
Yeah forgot about the revalidation!
Jan 7, 2021, 11:19 AM
Will update the code, thank you very much 😄
Jan 7, 2021, 11:20 AM
🎉 worked! :party_parrot:
Jan 7, 2021, 11:24 AM
(Thanks for helping out folks!)
Jan 7, 2021, 11:25 AM
Yeah forgot about the revalidation!
Jan 7, 2021, 11:19 AM
Will update the code, thank you very much 😄
Jan 7, 2021, 11:20 AM
(Thanks for helping out folks!)
Jan 7, 2021, 11:25 AM
🎉 worked! :party_parrot:
Jan 7, 2021, 11:24 AM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?