Javascript 问题是渲染方法';检查“EducationBlock”和#x27的渲染方法;
在EducationBlock中,我遇到以下错误:Javascript 问题是渲染方法';检查“EducationBlock”和#x27的渲染方法;,javascript,reactjs,Javascript,Reactjs,在EducationBlock中,我遇到以下错误: react-dom.development.js:56 Uncaught (in promise) 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
react-dom.development.js:56 Uncaught (in promise) 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, or you might have mixed up default and named imports.
Check the render method of `EducationBlock`.
这就是我导入的方式
import EducationBlock from './EducationBlock';
这就是我出口的方式
class EducationBlock extends Component {...}
export default withStyles(styles)(EducationBlock);
“/EducationBlock”组件中有多个导出吗?没有,只有一个export@Amnahkhatun你能在js fiddle或codesandbox.io中发布你的代码吗。或者,如果您可以共享EducationBlock.js的代码和导入的js文件。看起来像是输入错误检查我添加的这一点在“/EducationBlock”组件中有多个导出吗?没有,只有一个export@Amnahkhatun你能在js fiddle或codesandbox.io中发布你的代码吗。或者,如果您可以共享EducationBlock.js的代码和导入的js文件。看起来像是一个打字错误。看看我加的这个