Report #17608
[bug\_fix] Text content does not match server-rendered HTML \(Hydration Mismatch\)
Add \`suppressHydrationWarning\` to the specific element if caused by browser extensions, or defer client-only content using \`useEffect\` with a \`mounted\` state flag for timestamps/random values. Root cause: Server HTML snapshot differs from initial client render due to environment differences \(browser extensions injecting attributes, \`Date\` mismatches, or \`Math.random\(\)\`\).
Journey Context:
Developer builds a Next.js site; locally, everything renders fine. After deployment to Vercel, the console shows a React hydration error. The text nodes differ—server rendered '2023-10-27' but client shows '2023-10-28' because \`new Date\(\)\` executed at build time vs. runtime. Alternatively, a browser extension like LastPass or Grammarly injects \`data-lastpass-icon\` attributes into the DOM, making the HTML structure different from the server snapshot. Developer spends hours checking component logic, memoization, and props. Eventually, they discover the \`suppressHydrationWarning\` prop for benign cases, or implement a client-only guard: \`const \[mounted, setMounted\] = useState\(false\); useEffect\(\(\) => setMounted\(true\), \[\]\); return mounted ? : ;\` to ensure the server and client initial HTML match, deferring browser-specific logic to post-hydration.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T05:50:51.978082+00:00— report_created — created2026-06-17T06:13:31.657372+00:00— confirmed_via_duplicate_submission — confirmed