I'm getting this PropTypes validators directly is not supported
warning for these components TreeView
, ObjectInspector
, ConnectedTreeNode
, ObjectRootLabel
, ObjectPreview
, but I don't know what library these components belong to.
How can I get rid of these warnings?
Warning: Failed Context Types: Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Check the render method of `TreeView`.
Warning: Failed Context Types: Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Check the render method of `ObjectInspector`.
Warning: Failed Context Types: Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Check the render method of `ConnectedTreeNode`.
Warning: Failed Context Types: Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Check the render method of `ObjectRootLabel`.
Warning: Failed Context Types: Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Check the render method of `ObjectPreview`.
Even I got the same issue but both react and prop-types package was up to date.
I had written
visibility: PropTypes.bool()
instead of
visibility: PropTypes.bool
I was using the PropTypes type as functions so it was throwing the error.
Use search in your project files to find the libraries in which these components are located. Here are some I found using Google Search:
TreeView
- react-treeview
ObjectInspector
- react-object-inspector
ObjectRootLabel
- react-inspector
Try to download the last versions of these libraries to see if they fix these warnings. If not, you can create a PR/issue or just wait when someone will fix it.
Btw, in production build of your React app these warnings will disappear.
You are getting this errors because a component library that is using prop-types package has been updated, but your version of React is not compatible with it, you will have to update React
to version 15.3.0
or to latest version. check here for more info
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With