OpenAINext.jsOct 9, 2025, 8:00 PM

Next.js 16 (beta)

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

openaienmodel: gpt-5-mini-2025-08-07

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: true in next.config.ts.
  • Build & integrations

    • Build Adapters API (alpha): create custom adapters via experimental.adapterPath to modify build output or integrate deployment platforms.
    • create-next-app simplified: App Router, TypeScript-first, Tailwind and ESLint in the default template.
  • React & compiler

    • React Compiler support is stable but opt-in: enable with reactCompiler: true in next.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, and Activity.
  • 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.cacheComponents for 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 build linting (use Biome/ESLint), several experimental flags renamed/removed, experimental.ppr removed in favor of Cache Components.
    • Sync accessors changed: access to params, searchParams, cookies(), headers(), and draftMode() now must be awaited (use async/await). Metadata image route params now use async params.
    • next/image local 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.

Actionable migration tips

  • Add a second argument to revalidateTag() (recommend 'max') or switch to updateTag() for read-your-writes flows.
  • Audit code using synchronous params, searchParams, cookies(), headers(), or draftMode() and convert to async functions with await.
  • 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.

Full Translation

Translations

A translation section that keeps the flow of the original article.

openaijamodel: gpt-5-mini-2025-08-07

Next.js 16(ベータ)

Next.js 16(ベータ)

Next.js 16(ベータ)には以下が含まれます:

  • 安定版 Turbopack
  • ファイルシステムキャッシング(file system caching)
  • React Compiler のサポート
  • よりスマートなルーティング
  • 新しいキャッシュ API(new caching APIs)
  • React 19.2 の機能