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
Typo in PropTypes.checkPropTypes
section of Docs
#299
Comments
No, “age” is correct - it matches the code above it in the same section. |
Fair enough, I am sure you no better than I, but are you sure? In the source, that argument is labeled as the /**
* Assert that the values match with the type specs.
* Error messages are memorized and will only be shown once.
*
* @param {object} typeSpecs Map of name to a ReactPropType
* @param {object} values Runtime values that need to be type-checked
* @param {string} location e.g. "prop", "context", "child context"
* @param {string} componentName Name of the component for error messages.
* @param {?Function} getStack Returns the component stack.
* @private
*/
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
...
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' ...); I believe, if you ran your example it would produce this:
instead of this:
|
ahh, I see what you mean :-D and also why the mistake was made in #248 - which should be reverted. |
I see you have a |
That’d be great; that’s indeed what the label means. |
I believe there is a small typo in the
PropTypes.checkPropTypes
section of yourREADME.md
. Not a big deal, but wanted to point it out. It tripped me up for a little bit and wanted save the next person some time :).It reads:
When I believe it should read:
The text was updated successfully, but these errors were encountered: