react.js - create-react-app中为什么使用React.createClass会报warning
本文介绍了react.js - create-react-app中为什么使用React.createClass会报warning的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
create-react-app中使用React-createClas会报如下warning,只能使用extends React.Component.
使用ant design时会报propTypes的warning,报错如下图
求助大神
解决方案
react新版将废弃createClass,propType将会分到一个新的模块
这篇关于react.js - create-react-app中为什么使用React.createClass会报warning的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文