Next.js 16 (beta) — performance, caching, routing, and API updates
Key Points
- Turbopack is now the default and stable bundler
- New caching APIs: updateTag() and refresh(); revalidateTag() requires cacheLife
- Routing optimized with layout deduplication and incremental prefetching
Summary
Next.js 16 (beta) is available. This release moves Turbopack to stable and the default bundler, adds filesystem caching for Turbopack (beta), promotes the React Compiler integration to stable (opt-in), introduces an alpha Build Adapters API, and overhauls routing and prefetching. It also updates caching APIs (new updateTag() and refresh(), and a changed revalidateTag() signature), adopts React 19.2 features, and includes multiple breaking changes and removals you must check before upgrading.
Key Points
-
Performance
- Turbopack is now the default for new projects: expect 2–5× faster builds and up to 10× faster Fast Refresh. To keep using webpack: run
next dev --webpack/next build --webpack. - Turbopack File System Caching (beta) stores compiler artifacts on disk to speed restarts; enable via
experimental.turbopackFileSystemCacheForDev: trueinnext.config.ts.
- Turbopack is now the default for new projects: expect 2–5× faster builds and up to 10× faster Fast Refresh. To keep using webpack: run
-
Build & integrations
- Build Adapters API (alpha): create custom adapters via
experimental.adapterPathto modify build output or integrate deployment platforms. create-next-appsimplified: App Router, TypeScript-first, Tailwind and ESLint in the default template.
- Build Adapters API (alpha): create custom adapters via
-
React & compiler
- React Compiler support is stable but opt-in: enable with
reactCompiler: trueinnext.config.ts. Expect higher compile times; beneficial runtime by automatic memoization. - Next.js 16 runs on React 19.2 canary features like View Transitions,
useEffectEvent, andActivity.
- React Compiler support is stable but opt-in: enable with
-
Routing & prefetching
- Enhanced routing: layout deduplication (shared layouts downloaded once) and incremental prefetching (only missing pieces fetched). More requests may occur but with much lower total bytes.
- PPR flag removed and integrated into Cache Components; use
experimental.cacheComponentsfor opt-in and follow migration notes if you relied on PPR.
-
Caching APIs and server actions
revalidateTag(tag, cacheLife)now requires a cacheLife profile (e.g.,'max','hours') or{ revalidate: seconds }. Add the second arg to migrate.- New
updateTag()(Server Actions-only) provides read-your-writes semantics to expire and refresh tags immediately. - New
refresh()(Server Actions-only) refreshes uncached data without touching the cache; useful for live counters and non-cached endpoints.
-
Breaking changes & removals (important upgrade notes)
- Node >= 20.9.0 and TypeScript >= 5.1 required. Node 18 no longer supported.
- Removed: AMP support, automatic
next buildlinting (use Biome/ESLint), several experimental flags renamed/removed,experimental.pprremoved in favor of Cache Components. - Sync accessors changed: access to
params,searchParams,cookies(),headers(), anddraftMode()now must be awaited (useasync/await). Metadata image route params now use async params. next/imagelocal sources with query strings behavior changed — check image handling in your app.
-
How to try the beta
- Upgrade automatically: use
npx @next/codemod@canary upgrade beta. - Manual install:
npm install next@beta react@latest react-dom@latest. - New project:
npx create-next-app@beta.
- Upgrade automatically: use
Actionable migration tips
- Add a second argument to
revalidateTag()(recommend'max') or switch toupdateTag()for read-your-writes flows. - Audit code using synchronous
params,searchParams,cookies(),headers(), ordraftMode()and convert toasyncfunctions withawait. - Confirm your deployment environment meets Node 20.9+ and TypeScript 5.1+ requirements.
- If you relied on deprecated features (AMP, experimental flags), review the removals and available replacements before upgrading.
Please test the beta and report issues on the Next.js GitHub to help stabilize the stable release.