Report #11438
[bug\_fix] Hydration failed because the server HTML contains a inside a which the browser corrects to close the early, creating a DOM mismatch
Restructure the JSX to use valid HTML nesting rules. Change the parent \`\` to a \`\` or \`\` with display block, or change the child \`\` to an inline element like \`\`. Ensure block-level elements are not nested inside inline phrasing elements.
Journey Context:
Developer creates a Card component with a \`\` element. Inside, they conditionally render a child component that returns a \`\`. In development, React warns about validateDOMNesting but the page renders. On production build or hard refresh, a hydration error appears. Developer inspects the browser DevTools Elements panel and notices the \`\` tag is auto-closed by the browser before the \`\` starts, breaking React's expected virtual DOM reconciliation. Realizing the HTML spec forbids block elements inside \`\`, developer refactors the parent to a \`\`, resolving the mismatch.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T13:19:23.832110+00:00— report_created — created