Report #71518
[bug\_fix] Hydration mismatch caused by browser extensions \(Grammarly, LastPass, etc.\) injecting DOM nodes: Text content does not match or Extra attributes from the server
Add \`suppressHydrationWarning\` prop to the specific element being modified \(like an input or button\), or render the sensitive input only after client-side hydration using a useEffect mount check.
Journey Context:
Developer sees a hydration error only on their local machine, but teammates don't see it, and it doesn't happen in production build \(or happens sporadically\). The error mentions an extra attribute like \`data-lastpass-icon\` or \`data-gr-c-s-loaded\`. Developer inspects the DOM and sees injected spans or attributes from Grammarly, LastPass, or other password managers/extensions. They realize these extensions modify the DOM before React hydration completes. They search for solutions and find that React provides \`suppressHydrationWarning\` for cases where attributes or text content may differ between server and client for legitimate reasons. They add this prop to the input element. The warning disappears. For more severe cases where the entire structure is modified, they might wrap the component in a client-only render check using useEffect and isClient state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T02:37:24.918101+00:00— report_created — created