Menu
Important
Stay updated on React2Shell

Getting started with ISR

Last updated April 9, 2025

This guide will help you get started with using Incremental Static Regeneration (ISR) on your project, showing you how to regenerate your pages without rebuilding and redeploying your site. When a page with ISR enabled is regenerated, the most recent data for that page is fetched, and its cache is updated. There are two ways to trigger regeneration:

  • Background revalidation – Regeneration that recurs on an interval
  • On-demand revalidation – Regeneration that occurs when you send certain API requests to your app

Background revalidation allows you to purge the cache for an ISR route automatically on an interval.

The following example renders a list of blog posts from a demo site called , revalidating every 10 seconds or whenever a person visits the page:

To test this code, run the appropriate command for your framework, and navigate to the route.

You should see a bulleted list of blog posts.

On-demand revalidation allows you to purge the cache for an ISR route whenever you want, foregoing the time interval required with background revalidation.

Now that you have set up ISR, you can explore the following:


Was this helpful?

supported.