Report #95230
[bug\_fix] Text content does not match server-rendered HTML / Hydration failed because the initial UI does not match what was rendered on the server \(caused by browser extensions like Grammarly or Dark Reader injecting attributes\)
Add the \`suppressHydrationWarning\` prop to the specific element that differs, or wrap the client-specific content in a component that only renders after useEffect mounts \(client-only pattern\) to avoid server render entirely
Journey Context:
Developer sees a React hydration error in the console immediately after page load, pointing to a specific div containing text. Inspecting the server-rendered HTML vs client DOM reveals extra attributes or modified text content \(e.g., \`data-gr-id\` attributes from Grammarly or modified text from translation extensions\). Developer initially suspects a coding error in data fetching or state initialization. After disabling browser extensions one by one, the error disappears, confirming the extension is mutating the DOM before React hydrates. Tries to sanitize HTML but realizes it's the DOM that differs. Discovers \`suppressHydrationWarning\` tells React to ignore the mismatch on that specific node, while the client-only pattern ensures the differing content is never rendered on the server, eliminating the mismatch at the source.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T18:25:19.893240+00:00— report_created — created