Next.js 16 于 2026 年 3 月正式发布,标志着 Vercel 对 React Server Components 押注的全面兑现。这是自 App Router 引入以来变动最大的一次升级。
一、React Server Components 成为默认
在 Next.js 16 中,所有默认 export 的组件都被视为 Server Component,需要客户端交互时才显式添加 "use client"。这个设计反转让新代码的心智模型更简单——“默认服务器,需要时才客户端”。
// Next.js 16: 默认 Server, 显式 "use client"
// 默认就是 Server Component, 直接访问 DB!
export default async function ProductPage({ params }) {
const product = await db.product.find(params.id)
return <div>{product.name}</div>
}
// 需要交互才声明 Client Component
"use client"
export function QuantitySelector() {
const [qty, setQty] = useState(1)
return <button onClick={() => setQty(qty+1)}>{qty}</button>
}
二、Partial Prerender:让动态路由更像静态
Next.js 16 引入了 Partial Prerendering(PPR)的稳定版本。核心思路:页面骨架在 build 时预渲染(静态 CDN),动态部分在运行时流式注入。效果:首屏 TTFB 降低 40-60%,动态内容仍实时更新,SEO 完全正常。
三、Parallel Routes + Streaming 体验升级
Next.js 16 的 Parallel Routes 不再要求 Layout 必须等待所有子路由。每个 slot 可以独立 streaming,配合 Suspense Boundary,用户感知的加载速度接近原生。
四、Server Actions 新能力
- Form State 自动:useFormState 从 React 正式合并进 Next.js
- Type Safety 增强:Server Action 返回值自动推导
- 重试与超时:内置 retry 和 timeout 配置
五、迁移清单(从 15 → 16)
- 将所有非交互组件改为 Server Component(删除不必要的 "use client")
- 从 next/headers 迁移到 cookies() / headers()(Server Components 原生 API)
- 全局开启 Partial Prerender:
experimental: { ppr: "incremental" } - 测试所有动态路由的 SSR 输出
六、性能实测
| 指标 | Next.js 15 | Next.js 16 | 变化 |
|---|---|---|---|
| 首页 TTFB | 420ms | 165ms | ↓61% |
| FCP | 1.2s | 0.7s | ↓42% |
| LCP | 2.4s | 1.6s | ↓33% |
| JS Bundle | 147KB | 89KB | ↓39% |
Next.js 16 的最大影响是开发体验——不再需要手动判断每个组件该 Client 还是 Server。这会从根本上降低团队的心智负担。

