我对此反应感到困惑错误消息?

时间:2020-07-20 22:48:10

标签: reactjs

反应错误消息不会构造我的代码

我对这条路和终点感到困惑..

我已经尝试过更改应用程序的名称,但这不起作用

https://gist.github.com/patrowheels/fece9597d6862094a1a3672b9d6cdecf

1 个答案:

答案 0 :(得分:1)

您要导入为:

import Header from "./components/Header"
import MainContent from "./components/MainContent"
import Footer from "./components/Footer"

但是,您说的文件名为header.jsfooter.js等。

尝试导入为:

import Header from "./components/header.js"
import MainContent from "./components/maincontent.js"
import Footer from "./components/footer.js"

因此文件名匹配。