Skip to content

PropType validators error when an external lib bundles prop-types (v3) #5782

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

Closed
zekedroid opened this issue Dec 11, 2017 · 4 comments
Closed

Comments

@zekedroid
Copy link

Similar to #3988

I'm seeing the prop validation failures again on v3.2.0 after upgrading from v3.0.1.

The behavior I see is that in a previous version of react-router (v3.0.1) I don't see the error log. When upgrading JUST react-router to v3.2.0 I start to see the prop validation errors.

I also did an incremental upgrade to see when this error was reintroduced and it looks like up to v3.0.3 the router worked with no problems, but at v3.0.4 the validation errors started appearing again.

I didn't see any other closed/open issues on v3 having these issues so I thought I'd point it out since it would be sweet to upgrade to v3.2.0!

@timdorr
Copy link
Member

timdorr commented Dec 11, 2017

What specific error are you seeing?

@zekedroid
Copy link
Author

Several times repeated the following are the top ones for v3.2.0

Warning: Failed propType: Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types
Warning: Failed Context Types: Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types Check the render method of `Router`.
Warning: Failed Context Types: Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types Check the render method of `RouterContext`.

And for v3.0.5 there are way more, though they are more informative. Here are a couple:

Warning: You are manually calling a React.PropTypes validation function for the `component` prop on `Route`. This is deprecated and will not work in production with the next major version. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.
Warning: You are manually calling a React.PropTypes validation function for the `path` prop on `Route`. This is deprecated and will not work in production with the next major version. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.

and many more on what looks to be every method and property of the router.

Note that I'm using history v3.3.0 though I see no difference on any version of a history v3 object.

@timdorr
Copy link
Member

timdorr commented Dec 20, 2017

Closing this out as this is always caused by something in the build process or outside of React Router. For usage questions, please use Stack Overflow or Reactiflux where there are a lot more people ready to help you out. Thanks!

@timdorr timdorr closed this as completed Dec 20, 2017
@zekedroid
Copy link
Author

Yup, I went there first but given this had appeared in an issue in this repo I could only reason that it had to do with react-router. You were right, and it seems like the issue is using a version of react that is <0.14.9. Thanks for pointing it out, @timdorr

For those that are curious, here is the exact issue discussing this topic.

reduxjs/react-redux#669

@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants