FormidableLabs / victory-docs

Documentation for Victory: A collection of composable React components for building interactive data visualizations
http://formidable.com/open-source/victory
30 stars 64 forks source link

PropTypes and createClass warnings #371

Open chrisbolin opened 7 years ago

chrisbolin commented 7 years ago

When loading any victory-docs page, we get two 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

These cannot come from victory-docs itself, as we've completely removed createClass and React.PropTypes from the project; therefore it must be a dependency.

chrisbolin commented 7 years ago

all files in node_modules with createClass

$ grep -l createClass node_modules/**/*.js
node_modules/babel-standalone/babel.js
node_modules/espree/espree.js
node_modules/mobx-react/index.js
node_modules/prop-types/prop-types.js
node_modules/regjsparser/parser.js

and the actual versions used:

babel-standalone@6.25.0
espree@2.2.5
mobx-react@4.2.1
regjsparser@0.1.5
prop-types@15.5.10

outdated direct deps

Package       Current Wanted Latest Package Type
chai          3.5.0   3.5.0  4.0.2  dependencies    
history       3.3.0   3.3.0  4.6.3  dependencies    
normalize.css 5.0.0   5.0.0  7.0.0  dependencies    
radium        0.18.4  0.18.4 0.19.1 dependencies    
react-router  3.0.5   3.0.5  4.1.1  dependencies    
sinon         1.17.7  1.17.7 2.3.5  dependencies    
victory       0.20.0  0.20.0 0.21.0 dependencies  
chrisbolin commented 7 years ago

I think that the propTypes warning in a victory dependency issue: see the console warning here https://jsfiddle.net/a9to29oe/1/

The createClass error doesn't happen there though, so that's probably related to a victory-docs dependency.

chrisbolin commented 7 years ago

looking through yarn list, it looks like we have two packages that allow react@0.14.x...

├─ component-playground@1.3.2
│  ├─ react@^15.0.1 || ^0.14.7
...
├─ ecology@1.6.1
│  ├─ react@^15.1.0 || ^0.14.7