lwc icon indicating copy to clipboard operation
lwc copied to clipboard

Hydration incorrectly succeeds if className is missing on VDOM but not DOM

Open divmain opened this issue 2 years ago • 1 comments

There are cases where rendering in the browser produces VDOM that omits a className that was included during SSR. In these cases, hydration should fail with a warning. However, at present, validation will fail to detect this inconsistency, and hydration will "succeed", leaving the DOM/VDOM in an inconsistent state.

This is illustrated as a failing test in 63a36c30f. The tests added in this case should result in a failed hydration (which needs to be addressed separately). However, despite the inequality between server-generated and browser-generated DOM structures, the tests pass.

divmain avatar Aug 17 '22 08:08 divmain

This issue has been linked to a new work item: W-11609056

git2gus[bot] avatar Aug 17 '22 08:08 git2gus[bot]