Next.js 提供了许多性能工具;用好它们可以针对性地改善 Core Web Vitals —— LCP(加载)、CLS(布局稳定性)和 INP(交互性)。
尽量减少客户端 JavaScript(最大的杠杆)
tsx
// ✅ Keep components as Server Components; ship "use client" only at interactive leaves
// A Server Component sends ZERO JS for itself → smaller bundle → better INP/load
App Router 的超能力在于发送更少的 JS。繁重的逻辑和数据格式化都留在服务端;只有真正需要交互的“岛屿”才成为 Client Component。
优化 LCP 图片
tsx
;
