Partial Prerendering (PPR) with Static and Dynamic Content
Next.js 15 PPR combining static shell with streaming dynamic content for optimal performance
import { Suspense } from 'react';
export const experimental_ppr = true;
export default function Page() {
return (
<div>
{/* Static content - prerendered at build time */}
<Header />
<Hero />
{/* Dynamic content streams in at request time */}
<Suspense fallback={<RecommendationsSkeleton />}>
<PersonalizedRecommendations />
</Suspense>
{/* Static content */}
<Footer />
</div>
);
}
async function PersonalizedRecommendations() {
// This streams in after static shell loads
const recommendations = await fetch('https://api.example.com/recommendations', {
next: { revalidate: 60 },
});
return <RecommendationsList items={await recommendations.json()} />;
}