createClass & Proptypes warnings with React 15.5
See original GitHub issueIn 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:
- Created 6 years ago
- Comments:16
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
I thought we could just replace the
import * as React from 'react';
with more specific imports? None of our own files generate this error.