You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While looking into some SSR v2 test failures (namely 'attribute-global-html/as-component-prop/*), I wanted to test that engine-server actually matches engine-dom's behavior for HTML global / ARIA property-to-attribute reflection.
It seems it does not. In particular, there are two cases:
Case 1: the prop is declared internally to the component, but without using @api, e.g.:
Case 2: the prop is not declared internally to the component at all.
In both cases, if a parent component passes in a prop using template HTML, and if the child component renders its prop using its own template HTML, then the results do not match between engine-dom and engine-server, leading to hydration mismatches. Non-matching props:
I also suspect that we are not rendering the right attributes on child components, and that hydration mismatch detection is not detecting this correctly, but I'd need to dig deeper to confirm.
We are definitely not rendering the right attributes for child components. And unfortunately hydration does not detect this, because it considers them properties rather than attributes.
So for example, this repro renders the following in CSR:
While looking into some SSR v2 test failures (namely
'attribute-global-html/as-component-prop/*
), I wanted to test thatengine-server
actually matchesengine-dom
's behavior for HTML global / ARIA property-to-attribute reflection.It seems it does not. In particular, there are two cases:
Case 1: the prop is declared internally to the component, but without using
@api
, e.g.:Case 2: the prop is not declared internally to the component at all.
In both cases, if a parent component passes in a prop using template HTML, and if the child component renders its prop using its own template HTML, then the results do not match between
engine-dom
andengine-server
, leading to hydration mismatches. Non-matching props:Case 1:
Click to see
Case 2:
dir
draggable
hidden
tabIndex
Repro: 0a1ef15
This repro is based on existing fixture tests in
engine-server
.The text was updated successfully, but these errors were encountered: