I'm using create-react-app to start React
project.
At latest React 15.5.3
package, it appears following warnings:
Warning: Accessing PropTypes via the main React package is deprecated.
Use the prop-types package from npm instead.
I have already follow the blog:
npm install prop-types
and import PropTypes from 'prop-types';
but it doesn't work.
I don't use any PropTypes
or props
in code:
import React, { Component } from 'react';
import PropTypes from 'prop-types';
class App extends Component {
constructor() {
super();
this.state = {
videoVisible: true,
};
}
......
}
How to fix that?
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…