-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Match Preact behavior for boolean props on custom elements #24541
Conversation
@@ -89,7 +89,7 @@ module.exports = function(initModules) { | |||
console.log( | |||
`We expected ${count} warning(s), but saw ${filteredWarnings.length} warning(s).`, | |||
); | |||
if (filteredWarnings.count > 0) { | |||
if (filteredWarnings.length > 0) { |
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.
Drive-by fix that was required to get hydration mismatch warnings during development. This adds some noise to this test since there are a bunch of tests that expect more warnings than there actually are.
I started working on them by switching to toErrorDev
instead and it's a lot of work to fully switch. Though it revealed some odd error messages and that you also hit #22797 in your tests. So definitely worth pursuing IMO.
Following facebook#9230 (comment) except that `foo={true}` renders an empty string. See facebook#9230 (comment) for rationale.
5fb84e7
to
1c4f102
Compare
Comparing: 8197c73...ad479ab 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) |
We should get @josepharhar sign off on this |
Thanks for looking into this! I believe this is a good idea, and I can't find any reasons/history against going for this behavior. Rendering as |
is there a target release version this PR will land in? I'm curious about what to tell devs that are looking for this behavior |
It's out in |
Summary
Closes #9230 gated behind
enableCustomElementPropertySupport
i.e.react-dom@experimental
Implements #9230 (comment) with the exception of
How did you test this change?
enableCustomElementPropertySupport
libraries/react-experimental
still passes all their tests