📑 Table of Contents
Vercel's React framework Next.js has released its latest version — Next.js 15. This article provides a thorough walkthrough of the new features that dramatically improve both performance and developer experience, with real code examples.
In Next.js 15, Turbopack reaches stable with up to 76% faster dev server startups. Partial Prerendering enables seamless mixing of static and dynamic content within a single page.
1. Turbopack Stable Release
The biggest highlight is the stable release of Turbopack. Written in Rust, this bundler dramatically speeds up dev server startup and HMR.
- Dev server startup: Up to 76% faster vs Webpack
- HMR: Up to 96% faster
- Memory usage: 40% reduction on large projects
# Turbopack is enabled by default in Next.js 15
npx next dev
# Explicitly specify
npx next dev --turbopack
# Now available for production builds too
npx next build --turbopack
2. Server Components Evolution
Server Actions — functions executed directly on the server — have received major improvements in type safety and error handling.
// app/actions.ts
'use server'
import { z } from 'zod'
import { revalidatePath } from 'next/cache'
const PostSchema = z.object({
title: z.string().min(1, 'Title is required'),
content: z.string().min(10, 'At least 10 characters'),
})
export async function createPost(formData: FormData) {
const validated = PostSchema.safeParse({
title: formData.get('title'),
content: formData.get('content'),
})
if (!validated.success) {
return { error: validated.error.flatten() }
}
await db.posts.create({ data: validated.data })
revalidatePath('/blog')
return { success: true }
}
3. New Caching Strategy
Next.js 15 dramatically simplifies caching. The default has changed to no caching, requiring explicit control.
// Next.js 15: Explicit cache control
// No caching (default)
const data = await fetch('https://api.example.com/posts')
// Explicit cache + revalidate every hour
const cached = await fetch('https://api.example.com/posts', {
cache: 'force-cache',
next: { revalidate: 3600 }
})
The fetch() default has changed to no-store. During migration, use npx @next/codemod@latest find-implicit-caching to detect affected code.
4. Partial Prerendering (PPR)
Partial Prerendering is a revolutionary feature that allows static and dynamic content to coexist within a single page.
// app/page.tsx - PPR Example
import { Suspense } from 'react'
export default function HomePage() {
return (
<main>
{/* Static: Generated at build time, served from CDN */}
<h1>TechPulse</h1>
{/* Dynamic: Streamed at request time */}
<Suspense fallback={<Skeleton />}>
<LatestArticles />
</Suspense>
<Suspense fallback={<Skeleton />}>
<PersonalizedContent />
</Suspense>
</main>
)
}
5. Summary
- Turbopack stable delivers dramatic dev speed improvements
- Enhanced Server Actions make type-safe server processing easy
- Simplified caching makes debugging easier
- PPR gives you the best of both static and dynamic
Migration can be automated with npx @next/codemod@latest upgrade latest. Consider upgrading today!