Skip to content
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

Prop types validation should not happen twice #6791

Closed
sophiebits opened this issue May 17, 2016 · 0 comments
Closed

Prop types validation should not happen twice #6791

sophiebits opened this issue May 17, 2016 · 0 comments
Assignees

Comments

@sophiebits
Copy link
Collaborator

Historically, we validated prop types at component mount time, but we switched to validating them upon element creation because it gives earlier errors and better stack traces. We don't want to ever show a message with "Failed Composite propType:" any more, so we can remove the code that generates it. In addition, we should remove this check from fbjs that will be unnecessary after the code cleanup:

https://github.com/facebook/fbjs/blob/71392a58a2cbac228ffd535e9ebd7072a20acb73/src/__forks__/warning.js#L34

This should mildly improve performance in DEV mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants