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.

ViewPropTypes.js still use PropTypes from React package

See original GitHub issue

When try react-native run-ios, by using Debug JS Remotely, it showed those warning in Google Chrome developer tools.

Warning: PropTypes has been moved to a separate package. 
Accessing React.PropTypes is no longer supported and will be removed completely in React 16. 
Use the prop-types package on npm instead. (https://fb.me/migrating-from-react-proptypes)

By searching ViewPropTypes.js in react-native folder, at line 19:

const { PropTypes } = require('React');
  • React Native version: 0.45.1
  • Platform: iOS
  • Development Operating System: macOS 10.12.5
  • Build tools: Xcode 8.3.2

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
sachinwakcommented, Sep 11, 2017

after upgrade to “react-native”: “0.47.2” I still have this warning message in emulator. I am using android

0reactions
hellomayacommented, Jul 7, 2017

@padlock98 Try 0.46, I think.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typechecking With PropTypes - React
In this example, we're using PropTypes.string . When an invalid value is provided for a prop, a warning will be shown in the...
Read more >
ViewPropTypes will be removed from React ... - Stack Overflow
Solution: Install patch-package into your project, as per the instructions. Install deprecated-react-native-prop-types by running npm ...
Read more >
How to Use PropTypes in React - freeCodeCamp
In this blog, we will discuss how to validate or check the props that we are passing to avoid complex debugging at a...
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 >
view prop types will be removed from react native - You.com
The invariant seems to be enforced in node_modules/react-native/index.js , starting at line 436: ... You still use PropTypes within the object, however.
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