📌  相关文章
📜  期望一个字符串(用于内置组件)或类函数(用于复合组件)但得到:未定义 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:27.893000             🧑  作者: Mango

代码示例1
In my case (using Webpack) it was the difference between:

import {MyComponent} from '../components/xyz.js';
vs

import MyComponent from '../components/xyz.js';
The second one works while the first is causing the error. Or the opposite.