import React, { Component, PropTypes } from 'react' 报错:Cannot resolve symbol 'Component'
Cannot resolve symbol 'PropTypes' 1.解决 Cannot resolve symbol 'Component' 安装依赖:npm install @types/react --save
调用方法:import React, { Component } from 'react' 2.解决 Cannot resolve symbol 'PropTypes' 安装依赖:npm install prop-types --save
调用方法:import PropTypes from 'prop-types' 注:React.PropTypes 自 React v15.5 起已弃用。请使用 prop-types 库代替。
相关文章
- Cannot resolve symbol ‘Component’ & Cannot resolve symbol ‘PropTypes’
- @Slf4j idea标红Cannot resolve symbol ‘log‘
- java项目Cannot resolve symbol ‘xxxx‘的坑!!!
- Cannot resolve symbol ‘WebServlet‘
- 解决R文件找不到(cannot resolve symbol R)
- cannot resolve symbol servlet
- IDEA 提示Cannot resolve symbol “String“
- AndroidStudio cannot resolve symbol 解决办法 清楚缓存
- 关于intelliJ idea创建servlet提示cannot resolve symbol‘servlet’的问题
- R文件报错:cannot resolve symbol ‘R’