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.

Getting proptype warning errors for FB components

See original GitHub issue

Since upgrading to 0.30.0, we are now getting many, many warnings not to manually call React.Proptypes validation functions. But these are not in our code, they’re in RCT code.

Two of many:

ExceptionsManager.js:76 Warning: You are manually calling a React.PropTypes validation function for the borderBottomRightRadius prop on RCTImageView. 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.

ExceptionsManager.js:76 Warning: You are manually calling a React.PropTypes validation function for the translateY prop on TouchableHighlight. 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.

We’ve updated all our modules, so…

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:14
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

8reactions
idecommented, Aug 8, 2016

The fix is to use the version of React that is specified by

require('react-native/package.json').peerDependencies.react

For RN 0.30 and 0.31: npm install react@~15.2.1 For RN 0.32: npm install react@~15.3.0

3reactions
antoinerousseaucommented, Aug 4, 2016

That’s why you should stick to required peer dependencies: react-native requires react@~15.2.0, which does not include react 15.3, only versions >= 15.2 and < 15.3 (even if I also tried it haha). This change from ^ to ~ was recently introduced in react-native to avoid this kind of issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Don't Call PropTypes Warning - React
If you don't call PropTypes directly but still get the warning. Inspect the stack trace produced by the warning. You will find the...
Read more >
React proptypes warning before component is rendered?
However, I'm getting proptype errors -- along the lines of the prop x is marked as required in component Y but its value...
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 >
Master React PropTypes w/ Comprehensive Guide - Copycat
In this extensive guide, you'll learn what React PropTypes is, how to integrate PropTypes with React, and how to use PropTypes effectively.
Read more >
How To Customize React Components with Props
Unlike other type systems such as TypeScript, PropTypes will not give you a warning at build time, and as long as there are...
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