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

Friendlier message when using a type checker that is not a function #51

Merged
merged 1 commit into from Feb 21, 2019

Conversation

gouegd
Copy link

@gouegd gouegd commented May 13, 2017

Just a text change, adds a stronger hint as to the most common issue.
This tries to prevent confusion as discussed in #33

Sample:

> PropTypes.checkPropTypes({pname: PropTypes.stringzz}, {pname: false}, 'prop', 'MyCompo')
Warning: Failed prop type: MyCompo: type specification of prop `pname` is invalid; the type checker must be a function but is `undefined`. This often happens because of typos such as `React.PropTypes.function` instead of `React.PropTypes.func`.

Fixes #33.

@kevincoleman
Copy link

kevincoleman commented Sep 10, 2018

Bump.

Ran into this little confusion; googled it, and found this whole issue/PR thread. Simple change, just merge!

@ljharb
Copy link
Collaborator

ljharb commented Feb 21, 2019

(07d1b47 added the "received" type)

@ljharb ljharb force-pushed the better-message-undefined-prop-type branch 2 times, most recently from e341666 to b925248 Compare February 21, 2019 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants