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
Feature request: warn when property not in propTypes is passed into component #11
Comments
The best workaround right now is to use https://github.com/airbnb/prop-types |
This meets my basic need which is just to know if the provided prop names don't match the expected prop names as defined in proptypes.
|
remix-run/react-router#5114 is an example why this warning would by highly useful - ideally if the library authors could force it in their propTypes... |
Adding to @hakunin's answer in #11 (comment), I think we'd use |
Is using AirBnB's proptypes still the recommended solution? |
Here's an easy, DYI solution partially inspired by Airbnb's: utils/propTypesHelpers.js
app/components/MyComponent.js
It'll give you a |
It took me a while to figure out that |
This seems done with #87 and |
Apparently this feature is not yet implemented yet. See #263 |
If you don't want to change to airbnb's prop-types, this module may be helpful: https://www.npmjs.com/package/prop-types-exact |
Original issue: facebook/react#1587
The text was updated successfully, but these errors were encountered: