元素类型无效:期望一个字符串(对于内置组件)或一个类/函数(对于复合组件)但得到:undefined。您可能忘记从其定义的文件中导出组件。
检查p
。
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;