错误"元素类型无效" reactjs项目

时间:2018-01-15 11:52:15

标签: reactjs

一切都运转得很好,突然之间,我得到了令人难以置信的错误,回过头去做事,当事情正在发生时,我仍然得到这个错误,我不知道为什么< / p>

元素类型无效:期望一个字符串(对于内置组件)或一个类/函数(对于复合组件)但得到:undefined。您可能忘记从其定义的文件中导出组件。

检查p

的渲染方法

&#13;
&#13;
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.

Check the render method of `p`.
▶ 25 stack frames were collapsed.
./src/index.js
C:/Users/Jseto/Desktop/jsetome/src/index.js:27
  24 | 
  25 | const app = document.getElementById('root');
  26 | 
> 27 | ReactDOM.render(
  28 | 	<HashRouter>
  29 | 		<Switch>
  30 | 			<Route exact path="/" component={App}/>
&#13;
&#13;
&#13;

0 个答案:

没有答案