当前行为Invariant Violation: Invariant Violation: 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, o
我是一个反应js的初学者。在构建一个小项目时,我面临着这样的问题。
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 i
在另一个文件中,我是这样导入的,但是当我在测试中使用时,我得到了错误React.createElement: type is invalid --需要一个字符串(对于内置组件)或一个类/函数(对于复合组件您可能忘记了从定义组件的文件中导出组件,或者您可能混淆了默认导入和命名导入。可以是什么?
import { RateComponent, mapStateToProp