Next.js App Router: Hydration mismatch only in production – how to debug?
In dev mode everything renders fine, but after next build && next start I get hydration mismatch warnings on certain pages with App Router (Next.js 14+). It seems data or markup differs between server and client.
Questions:
- What are the most common root causes in App Router (RSC/RSS) leading to hydration mismatches?
- How do you systematically isolate the mismatch (logging, checksum techniques, or diffing rendered HTML)?
- Any patterns to avoid mixing client-only behavior in server components?
Context:
- Using React Server Components by default
- Some components depend on
windowor localStorage - Deployed on Vercel (Node 18)
0