Skip to content

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