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>
}
}
_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>
}
}
相关文章推荐
- 【原】React Native踩坑系列之-Super expression must either be null or a function, not undefined
- Super expression must either be null or a function, not undefined
- Uncaught TypeError: Super expression must either be null or a function, not undefine
- Uncaught (in promise) TypeError: Super expression must either be null or a function
- TypeError: super(type, obj): obj must be an instance or subtype of type
- yii Column name must be either a string or an array.
- Element type "EditText" must be followed by either attribute specifications, ">" or "/>".
- XML2JSON 的【net.sf.json.JSONException: nu.xom.ParsingException must be followed by either attribute specifications, ">" or "/>"】问题解决办法
- react---RoutingConfig(...): A valid React element (or null) must be returned. You may have returned
- Element type "Resource" must be followed by either attribute specifications, ">" or "/>".
- org.springframework.dao.InvalidDataAccessApiUsageException: Name must not be null or empty!;
- Generic detail view DetailView must be called with either an object pk or a slug.
- HttpClient:Target host must not be null, or set in parameters
- Element type "property" must be followed by either attribute specifications, ">" or "/>"
- java.sql.SQLException: 批处理中出现错误: batch must be either executed or cleared
- java.sql.SQLException: 批处理中出现错误: batch must be either executed or cleared
- Caused by: java.lang.IllegalStateException: Target host must not be null, or set in parameters.
- Frame pixels must be either solid or transparent (not intermediate alphas)
- java.lang.IllegalStateException: Target host must not be null, or set in parameters. scheme=null, ho