Element type is invalid: expected a string (for built-in components) or a class/function
发布于 2022-09-07    4,355 次阅读
报错: Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component f...

报错:

Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports

原因:

把   default  删掉。