-
Notifications
You must be signed in to change notification settings - Fork 356
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
PropType validators error when an external lib bundles prop-types #38
Comments
Can you provide a standalone example demonstrating the issue? I don't fully understand what's going on. |
I've created a simple example here. |
I think the issue occurs because you're using a production build of the library with a development build of React. |
Fixed this in |
If an external lib containing React components bundles
prop-types
the validators error is thrown when one of the components is used.The solution (for webpack) is to add
prop-types
toexternals
in the webpack config and add it as a peerDependency.This should probably be mentioned in the readme and/or in https://github.com/facebook/react/blob/master/docs/warnings/dont-call-proptypes.md
The text was updated successfully, but these errors were encountered: