Report #62686
[bug\_fix] Hydration mismatch: Text content does not match server-rendered HTML due to dynamic data or browser extensions
Add \`suppressHydrationWarning=\{true\}\` to the element with dynamic content \(like dates\) when the difference is expected and harmless. For browser extensions, identify the extension and exclude its selectors, or use \`suppressHydrationWarning\` as a last resort. Root cause: React’s hydration expects identical HTML between server and client; any difference \(even a timestamp or injected DOM from extensions\) causes a mismatch during the hydration reconciliation.
Journey Context:
Developer deploys a Next.js 13 App Router app to Vercel. Everything works locally, but production logs show 'Text content does not match server-rendered HTML.' Developer checks the component—it's a simple layout with \{new Date\(\).toLocaleString\(\)\}. Realizes the server rendered '1/1/2024, 12:00:00 PM' but the client rendered '1/1/2024, 12:00:05 PM' due to the time delay. Spends an hour trying to sync the date, then discovers \`suppressHydrationWarning\` prop. Alternatively, developer finds the error mentions a \`\` they didn't write—traces it to Grammarly browser extension injecting DOM, causing the mismatch. Removes extension or adds warning suppression.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:42:10.127055+00:00— report_created — created