Report #95602
[bug\_fix] Text content does not match server-rendered HTML \(Hydration mismatch caused by browser extensions\)
Add the \`suppressHydrationWarning\` prop to the affected element \(commonly \`\` or \`\` in root layout\), or guard client-only content with a \`useEffect\` mounted check to prevent server rendering of browser-specific content.
Journey Context:
Developer sees a React hydration error in the console on page load, noting that the server HTML differs from the client. Inspecting the DOM diff reveals mysterious attributes like \`data-gr-ext-installed\` or \`data-new-gr-c-s-check-loaded\` injected into the \`\` tag. Realizing browser extensions \(Grammarly, Dark Mode extensions\) are modifying the DOM before React hydrates, the developer initially tries to remove the attributes via useEffect, which fails because the mismatch happens during hydration. Consulting Next.js docs reveals the \`suppressHydrationWarning\` boolean prop, which is added to the root element. The warning disappears because React now expects a mismatch and suppresses the warning, while the extension continues to function.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T19:03:03.155512+00:00— report_created — created