React.createElement: type should not be null, undefined, boolean, or number
2016-09-27 20:13
1266 查看
原因是你通过
这个方法引入了一个export default的对象作为react组件。
对于export default的对象,你应该直接引入,通过以下方法。
有可能有其它情况,总的来说是你的组件发生了错误,一般错误是引入时发生的。
参考:
https://codereviewvideos.com/blog/warning-react-createelement/
import {xxx} from 'xxx'
这个方法引入了一个export default的对象作为react组件。
对于export default的对象,你应该直接引入,通过以下方法。
import xxx from 'xxx'
有可能有其它情况,总的来说是你的组件发生了错误,一般错误是引入时发生的。
参考:
https://codereviewvideos.com/blog/warning-react-createelement/
相关文章推荐
- React.createElement: type is invalid -- expected a string (for built-in components) or a class/funct
- mybatis 引用对象属性映射错误 or could not be found for the javaType (xxx.model) : jdbcType (null) combination.
- Uncaught TypeError: Super expression must either be null or a function, not undefine
- 关于TypeError : React object is undefined on createElement
- "Your computer could not be joined to the domain. You have exceeded the maximum number of computer accounts you are allowed to create in this domain. Contact your system administrator to have this limit reset or increased."
- react---RoutingConfig(...): A valid React element (or null) must be returned. You may have returned
- Javascript高级程序设计——3.数据类型(1)typeof、null、undefined、boolean、number
- javascript初学记2 -- 字符串, Date, Boolean, null, undefined, Number
- java.lang.IllegalStateException: Target host must not be null, or set in parameters.
- 在发送请求时 java.lang.IllegalStateException: Target host must not be null, or set in parameters. scheme=n
- ios学习之路(知识点)Values of type 'NSInteger' should not be used as format arguments...
- ArcGIS Engine中初始化许可常见问题归纳,the application is not licensed to create or modify schema for this type of data
- The requested list key 'map' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or peopl .
- values of type NSInteger should not be used as format arguments; 关于Xcode中烦人的32位与64位警告处理方法.
- Microsoft.Practices.Unity使用配置文件总是报错The type name or alias could not be resolved.
- React总结10:当组件return boolean null undefined
- MSbuild failure: error CS0246: The type or namespace name 'DataLoader_Accessor' could not be found
- SP2-0678: Column or attribute type can not be displayed by SQL*Plus
- org.xml.sax.SAXParseException: Element type "beans" must be followed by either attribute specifications, ">" or "/>".
- TypeError: 'bases' is null or not an object。IE8 bug 腐朽的对象