-
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
Strip React.PropTypes type checking code in production #7651
Conversation
This reverts commit e75e8dc.
Also pushed a revert for warning added in #7132. |
}; | ||
productionTypeChecker.isRequired = productionTypeChecker; | ||
var getProductionTypeChecker = () => productionTypeChecker; | ||
// Keep in sync with production version above |
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 believe this should say "Keep in sync with the development version above."
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.
Thanks
The PR is fine, don’t be fooled by 0.007% decrease in coverage.. |
FWIW, I just changed the threshold for coveralls to -1% so hopefully we don't get too much noise from failures there. |
var getProductionTypeChecker = () => productionTypeChecker; | ||
// Keep in sync with development version above | ||
var ReactPropTypes = { | ||
array: getProductionTypeChecker(), |
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.
What's the point of calling it here? Why not just put productionTypeChecker
?
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'm trying to mirror the structure above exactly so it's easy to keep them in sync.
Closing, will resubmit as another PR. |
This is #6401 revived.
It’s a major change that can go in 16 now that we warn for calls in 15.
This gives us -1K from isomorphic React post gzip.