-
Notifications
You must be signed in to change notification settings - Fork 47.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove enableFilterEmptyStringAttributesDOM #31765
Remove enableFilterEmptyStringAttributesDOM #31765
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed a bug with this today. Empty href
string doesn't hydrate on the client since the attribute is omitted from the server. Causing a hydration error (in addition to the warning).
Comparing: 3ad17ec...fda9cd7 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
'or pass null to %s instead of an empty string.', | ||
propKey, | ||
propKey, | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should probably skip hydrateSanitizedAttribute
below if we already warned above.
I.e. call continue
in the branch above.
Otherwise we end up both logging the error and with a hydration error, because the server will have omitted this attribute.
The hydration error is also not correct because it's not what the client would've done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean only in the DEV branch above? That seems weird to differ in behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what you're saying is that this would be how to fix the bug you found, so i'll merge with the existing behavior and we can fix the bug in a follow up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well the DEV branch is defensive. This whole function is inside a DEV branch so it's not divergent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Base: #31765 Landed everywhere
Base: facebook#31765 Landed everywhere DiffTrain build for [1520802](facebook@1520802)
Base: facebook#31765 Landed everywhere DiffTrain build for [1520802](facebook@1520802)
Base off #31764
This has landed everywhere