Closed jmsjtu closed 3 months ago
This issue has been linked to a new work item: W-15963098
has this issue been fixed if not can i try to work on it?
@HermanBide thanks for your interest!
We're already working on a fix that should be ready later today.
If you'd like to contribute, we have other issues under the "Up for grabs" label.
Description
Statically optimized content fails hydration validation when static and dynamic attributes are mixed on the same element.
Steps to Reproduce
The above will fail hydration validation because each static part always validates the attributes, styles and class names against the element.
Since
class
is static it will be assigned when the fragment is created by the browser and does not have an associated static part.Expected Results
Hydration validation should not fail.
Actual Results
Hydration validation failing.
Possible Solution
We should opt out of validating against
style
orclass
if it's not present on the static part.The purpose of the hydration validation is to ensure that hydration occurred successfully, in this case hydration does not occur for the static values.