您的位置:首页 > 其它

TypeError: Super expression must either be null or a function, not undefined

2018-01-03 20:21 1296 查看
TypeError: Super expression must either be null or a function, not undefined

_inherits http://localhost:3000/static/js/bundle.js:42168:113
(anonymous function) http://localhost:3000/static/js/bundle.js:42213:2
./src/index.js
F:/git/nodejs-study/imocc/create-react-app/my-app/src/index.js:24

错误原因:component的c应该是大写的
class Test extends React.component{
constructor(props){
super(props);
}

render(){
console.log(this.props)
return <h2>测试组件</h2>
}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐