OpenAINext.jsOct 15, 2024, 2:00 AM

Next.js 15 RC 2

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 15 RC 2 — Release Candidate Highlights

Key Points

  • Async request APIs are now async (breaking)
  • Turbopack for faster local dev (opt‑in)
  • Secure, nondeterministic Server Action IDs

Summary

Next.js 15 RC 2 focuses on developer experience, performance, and security ahead of the general release. Key updates include an enhanced upgrade codemod, opt-in Turbopack for development, a breaking change that makes request-specific server APIs asynchronous, improved Server Action security, a new Form component, TypeScript support for next.config.ts, stable server instrumentation, and multiple build/dev performance improvements.

Key Points

  • Upgrade tooling

    • Use the automated codemod CLI to upgrade: npx @next/codemod@canary upgrade rc.
    • Manual upgrade: npm install next@rc react@rc react-dom@rc.
  • Turbopack (development)

    • Opt-in with next dev --turbo.
    • Improves cold compile performance: ~25–35% memory reduction and ~30–50% faster compilation for large pages vs the previous RC.
    • Work continues on persistent caching and build support.
  • Breaking: Async Request APIs

    • Request-bound APIs (cookies, headers, draftMode, params in layout/page/route/default/generateMetadata/generateViewport, and searchParams in page.js) are transitioning to async; use await (example: const cookieStore = await cookies()).
    • Temporary synchronous access remains with dev/production warnings; migrate with npx @next/codemod@canary next-async-request-api and consult the upgrade guide for manual fixes.
  • Server Actions security

    • Dead code elimination removes unused actions from client bundles and prevents public IDs.
    • Action IDs are now unguessable and periodically recalculated between builds.
    • Treat actions as public endpoints; minimize exposed logic.
  • Forms and routing

    • New <Form> component (import Form from 'next/form') adds prefetching, client-side navigation, and progressive enhancement without boilerplate.
  • Configuration and observability

    • next.config.ts is supported with NextConfig typing for type-safe config.
    • instrumentation.js and register() are stable; onRequestError hook is available for server error observability integrations.
  • Development & build improvements

    • Server Components HMR reuses cached fetch responses to reduce re-fetching during development.
    • Faster static generation for the App Router by reusing the first render and sharing fetch cache across worker pages.
    • Experimental advanced static generation options added (use with caution — may increase resource usage).
    • Additional improvements: self-hosting Cache-Control controls and ESLint 9 support.

Actionable Notes for Engineers

  • Try RC2 locally: npx @next/codemod@canary upgrade rc then npm install next@rc react@rc react-dom@rc.
  • Audit code for synchronous usages of cookies(), headers(), params, and searchParams; run the async-request codemod and test thoroughly.
  • Opt into Turbopack for dev when testing large apps: next dev --turbo.
  • Review Server Actions to ensure unused exports are removed and sensitive logic is not exposed as public endpoints.
  • Add next.config.ts if you want typed config and wire up instrumentation.js for observability integrations.

References

See the Next.js 15 RC 2 announcement and linked upgrade guides and codemods for migration details and full docs.

Full Translation

Translations

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

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

Next.js 15 RC 2 が利用可能になりました

Next.js 15 RC 2

第2版の Next.js 15 リリース候補(RC)が利用可能になりました。

  • このバージョンでは、今後の安定版リリースの前に最新の機能をテストできます。