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

createChainableTypeChecker suggests mistyped props by case #6173

Closed
wants to merge 1 commit into from
Closed

createChainableTypeChecker suggests mistyped props by case #6173

wants to merge 1 commit into from

Conversation

bspaulding
Copy link
Contributor

Possibly addressing #6153

`\`${componentName}\`.`;
var lowerPropName = propName.toLowerCase();
if (props[lowerPropName] != null) {
message += ` Did you mistype \`${lowerPropName}\`?`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's say "miscapitalize" instead of "mistype"; it's a little more clear.

@jimfb
Copy link
Contributor

jimfb commented Mar 3, 2016

Also, I think the location of this code seems wrong. You put this logic inside isRequired, which means it will only fire if the prop is required, but we want to fire in all cases of an incorrectly cased prop.

Also, new warnings should be added via a devtool (as an example, take a look at #6121)

@jimfb
Copy link
Contributor

jimfb commented Mar 14, 2016

#6255 seems closer, so I'm going to close this out in favor of that one.

@jimfb jimfb closed this Mar 14, 2016
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.

3 participants