Skip to content

PropTypes and React.createClass deprecation warnings. Also react dependency issues #298

@tamj0rd2

Description

@tamj0rd2

Description

When running tests with a newly generated react native app, there are warnings about PropTypes being moved to a separate package and React.createClass no longer being supported.

Steps to reproduce

yarn test

Expected Behavior

Expected the tests to pass with no errors or warnings

Observed Behavior

Got the following warnings although the test did pass

  console.error node_modules/fbjs/lib/warning.js:36
    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)

  console.error node_modules/react-native/Libraries/Core/ExceptionsManager.js:71
    Warning: React.createClass is no longer supported. Use a plain JavaScript class instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement. (https://fb.me/migrating-from-react-create-class)

Environment

Please run these commands in the project folder and fill in their results:

  • npm ls react-native-scripts:
awesomeproject@0.1.0 /mnt/Storage/Coding/AwesomeProject
├── UNMET PEER DEPENDENCY react@16.0.0-alpha.12
└── react-native-scripts@0.0.40 

npm ERR! peer dep missing: react@>=15.4.0, required by react-native-maps@0.15.2
  • npm ls react-native:
awesomeproject@0.1.0 /mnt/Storage/Coding/AwesomeProject
├── UNMET PEER DEPENDENCY react@16.0.0-alpha.12
└── react-native@0.45.1 

npm ERR! peer dep missing: react@>=15.4.0, required by react-native-maps@0.15.2
  • npm ls expo:
awesomeproject@0.1.0 /mnt/Storage/Coding/AwesomeProject
├─┬ expo@18.0.6 
│ └── UNMET PEER DEPENDENCY react@>=15.3.1
└── UNMET PEER DEPENDENCY react@16.0.0-alpha.12

npm ERR! peer dep missing: react@>=15.4.0, required by react-native-maps@0.15.2
npm ERR! peer dep missing: react@>=15.3.1, required by lottie-react-native@1.1.1
npm ERR! peer dep missing: react@>=15.4.0, required by react-native-branch@2.0.0-beta.3
  • node -v: v6.10.3
  • npm -v: 3.10.10
  • yarn --version: 0.24.6
  • watchman version: not installed

Also specify:

  1. Operating system: Ubuntu 16.04
  2. Phone/emulator/simulator & version: Genymotion

Reproducible Demo

Repo: https://github.com/tamj0rd2/react-native-example

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions