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

Fix #6153: Warning for PropTypes with the wrong case. #6935

Closed

Conversation

wali-s
Copy link
Contributor

@wali-s wali-s commented Jun 1, 2016

Re-based code from #6255

The warning outputting twice issue in that PR has since been fixed in react itself.

The cache that he added has been removed as it would hit a lot of false positives (multiple components using the same proptypes).

@@ -114,6 +115,11 @@ function createChainableTypeChecker(validate) {
) {
componentName = componentName || ANONYMOUS;
propFullName = propFullName || propName;
if (__DEV__) {
Copy link
Contributor

@aweary aweary Jun 1, 2016

Choose a reason for hiding this comment

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

Is this check necessary? I'm pretty sure that prop types are only validated in __DEV__ anyways so this would only be executed in the __DEV__ code path anyways.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. Fixed.

@ghost
Copy link

ghost commented Jun 1, 2016

@wali-s updated the pull request.

@wali-s wali-s force-pushed the warn-for-miscapitalized-propname branch from 4b9cb0b to 05779a9 Compare June 1, 2016 10:11
@ghost
Copy link

ghost commented Jun 1, 2016

@wali-s updated the pull request.

@gaearon
Copy link
Collaborator

gaearon commented Jun 26, 2016

If you rebase someone else’s PR, I think it’s best to first comment on that PR and offer help. It was the author’s first PR in React repo, and they were waiting for the further review. I think they might be surprised somebody else rebased their PR, and they no longer get an entry in “contributed to” 😉 .

@gaearon
Copy link
Collaborator

gaearon commented Jun 26, 2016

I left a few comments in #6255 which is the original PR. I think the approach itself might be problematic so let’s discuss there first. If the author doesn’t respond we can resurrect this PR but it’s best to give the original author a chance to handle this first. Thank you for the effort though!

@gaearon gaearon closed this Jun 26, 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.

4 participants