Element type is invalid: expected a string (for built-in components) or a class/function

报错:

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

Element type is invalid: expected a string (for built-in components) or a class/function_第1张图片

原因:

Element type is invalid: expected a string (for built-in components) or a class/function_第2张图片

Element type is invalid: expected a string (for built-in components) or a class/function_第3张图片

把   default  删掉。

你可能感兴趣的:(React)