-
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
Don't use nested objects to "namespace" namespace constants #21073
Conversation
looks like you missed some. |
c4d3fd5
to
d510162
Compare
Comparing: 7b84dbd...d510162 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
namespace = getIntrinsicNamespace(tag); | ||
} | ||
|
||
if (__DEV__) { | ||
if (namespace === Namespaces.html) { | ||
if (namespace === HTML_NAMESPACE) { |
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.
So this is really weird. We track the namespace in prod and the only thing we use it for is this warning.
We don't need the namespace on the server since it's implied by the HTML.
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.
Looks like it was intentional. #10452
But I'm just going to remove this because it's not worth the overhead/complexity when we don't bother with this on the client anyway.
Not sure if closure is smart enough but as a pattern we don't gamble.