question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React.PropTypes validation warning

See original GitHub issue

I have react@15.3.1 and react-redux@4.4.5 in my project and got the following warning:

warning.js:36 Warning: You are manually calling a React.PropTypes validation function for the `store` prop on `Connect(ToolboxContainer)`. This is deprecated and will not work in 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.js:36 Warning: You are manually calling a React.PropTypes validation function for the `store` prop on `Provider`. This is deprecated and will not work in 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.js:36 Warning: You are manually calling a React.PropTypes validation function for the `children` prop on `Provider`. This is deprecated and will not work in 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.js:36 Warning: You are manually calling a React.PropTypes validation function for the `actions` prop on `ToolboxContainer`. This is deprecated and will not work in 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.

How to avoid these warnings? I’ve read this guide but still have no idea. Not sure if it is emitted by react-redux’s storeShape. Please point out if i’m wrong, thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
actionnickcommented, Apr 13, 2017

Tried updating the 5.0.4 and still seeing the warning.

Really seems like react-redux is generating the warning. Stack trace looks something like…

Warning: Failed prop type: 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
    in Connect(Component) (created by OtherComponent)
    in OtherComponent (created by SomeOtherComponent)
    ...
0reactions
denielercommented, Apr 26, 2017

@timdorr sorry, created clean project and seems it works

Read more comments on GitHub >

github_iconTop Results From Across the Web

Don't Call PropTypes Warning - React
In a future major release of React, the code that implements PropType validation functions will be stripped in production. Once this happens, any...
Read more >
How to validate React props using PropTypes - LogRocket Blog
Learn how to validate props with React PropTypes, React's internal mechanism for adding type checking to component props.
Read more >
Conditional rendering and warning when using propTypes ...
In your case it will return false when the user is not logged in, and you still expect to get a valid React...
Read more >
How to avoid React.Proptypes warning | by Sergio Zamarro
As the warning says React.Proptypes is dreprecated in React 15.5.0. Now you must use prop-types library ...
Read more >
prop-types - npm
You can use prop-types to document the intended types of properties passed to components. React (and potentially other libraries—see the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found