-
Notifications
You must be signed in to change notification settings - Fork 47.1k
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
Add React.PropTypes.any #842
Comments
👍 Side-question, would it be interesting to be able to specify something like Also, another thing to consider, it's currently quite tedious to write custom validators for inputs as you have to bypass all logic provided by React. Wouldn't it perhaps be reasonable to have something like |
What if we just made |
|
React.PropTypes.any
should allow any value to be passed as a prop. Having it as a valid PropType would allow forReact.PropTypes.any.isRequired
, to enforce that something is passed, whatever it may be. It also supports documenting all possible props for a component: even if a prop may be anything, having it explicitly listed asReact.PropType.any
is useful documentation.The text was updated successfully, but these errors were encountered: