React 项目运行时报错: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.
原因: 导入的组件有问题,检查你的组件是否成功 1. 组件的名字是否正确 2. 组件的书写是否正确(我的错误就是有个组件,创建了文件,还没有写代码,所以导入的时候就报错了) |
|