SSG with timed revalidation that regenerates pages in the background. Excellent for Catalogs, News sites, and Product listings that need periodic updates without full rebuilds.
ISR uses async Server Components with page-level revalidation. Use generateStaticParams for dynamic routes.
export const revalidate = 3600; // 1 hour
export async function generateStaticParams() {
return [{ id: "1" }, { id: "2" }];
}
export default async function ISRComponent({ params }: { params: { id: string } }) {
const res = await fetch("https://api.example.com/data");
const data = await res.json();
return <div>{data.message}</div>;
}