- 报错: Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it‘s defined in, or you might have mixed up default and named imports.
报这个错的原因是,创建了react组件之后没有使用export default对外暴露就在父组件中应用该,使用export default暴露出去就可以了哦!
......持续更新中
记录一下react开发过程中常见报错,警告以及解决的方法
原文:https://www.cnblogs.com/zhang-jiao/p/13444859.html