-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: