Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 问题是渲染方法';检查“EducationBlock”和#x27的渲染方法;_Javascript_Reactjs - Fatal编程技术网

Javascript 问题是渲染方法';检查“EducationBlock”和#x27的渲染方法;

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

在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 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文件。看起来像是一个打字错误。看看我加的这个