This comment has been minimized.

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

This comment has been minimized.

This comment has been minimized.

edited

Author

Yes. But I haven't heard of it before. my pull request and PropTypes.extra have a common goal to warn those outer types not validate in child propsTypes. So developers can know how many props actually we use, and remove unnecessary props.

This comment has been minimized.

edited

Author

well, I have a question:
If you add extra in your project, are you both have extra and no extra components ?
I think those who notice extra, are sure to want to check all props.Even we have React.memo and PureComponent, It will still cause re-render when unsed props change.

And by the way, what is prop-types aim? It's only check the props you use or check the props from outer? the PropTypes.x.isRequired warn developer I must have value from parent. why we shouldn't warn developer that props not validated in child 😬?

This comment has been minimized.

Yes, this is true - generally that's why you'd want to use a linter rule to require all your components use exact props. There are many components - like react-router's Link - that would break with this restriction.

Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.