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.

createClass & Proptypes warnings with React 15.5

See original GitHub issue

In react 15.5 the browser console and test results get polluted with the following warnings. The call stack in the logs says it is the react-virtualised import/require call that is triggering the warnings.

Warning: Accessing PropTypes via the main React package is deprecated, and will be removed in  React v16.0. Use the latest available v15.* prop-types package from npm instead. For info on usage, compatibility, migration and more, see https://fb.me/prop-types-docs
Warning: Accessing createClass via the main React package is deprecated, and will be removed in React v16.0. Use a plain JavaScript class instead. If you're not yet ready to migrate, create-react-class v15.* is available on npm as a temporary, drop-in replacement. For more info see https://fb.me/react-create-class
  • react@15.6.2
  • react-virtualized@9.18.5

Minor issue I know but hopefully an easy fix?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16

github_iconTop GitHub Comments

1reaction
TrySoundcommented, May 24, 2018

React virtualized is compatible with react 16. You should never use propTypes and createClass from react namespace. If one of your dependencies uses them then send issue or replace with maintaned dependency.

1reaction
hartrorcommented, Mar 8, 2018

I thought we could just replace the import * as React from 'react'; with more specific imports? None of our own files generate this error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable React.createClass and PropTypes deprecated ...
Accessing createClass via the main React package is deprecated, and will be removed in React v16.0. Use a plain JavaScript class instead. If...
Read more >
React v15.5.0 – React Blog
New Deprecation Warnings. The biggest change is that we've extracted React.PropTypes and React.createClass into their own packages.
Read more >
Disable React.createClass and PropTypes deprecated ...
Warning : Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead. react-bootstrap/es/PanelGroup.js --->
Read more >
Convert React.createClass to ES6 Class - Dave Ceddia
As of React 15.5, createClass is deprecated. You'll get warnings in the console if you're using it in your code – and, when...
Read more >
React 15.5 Gets Ready For Rewrite - I Programmer
PropTypes or React.createClass. The warnings are raised because the developers have extracted both React.PropTypes and React.createClass into ...
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