component={HomePage}报异常,请老师帮看下
来源:6-3 【路由初始化】配置react-router

JasonQuery
2021-05-11
都正常按老师说的写的
"devDependencies": {
"@types/react-router-dom": “^5.1.7”,
“typescript-plugin-css-modules”: “^3.2.0”
}
写回答
4回答
-
最帅的编程王子
2023-05-24
外面套一层<Routes>,而且新的属性Component首字母要大写
012023-08-20 -
licheng58
2022-10-25
外面套一层<Routes>就好了
00 -
weixin_慕前端0558627
2021-11-24
我跟他一模一样,我重新下了n遍npm install,还是不行,把package.json复制过来重新下也不行,代码我感觉也没问题
012022-01-17 -
阿莱克斯刘
2021-05-17
看起来代码应该是没有问题的,试试把node_modules文件夹全都删了,然后再重新npm install。如果还不行请把代码发到我邮箱,我来看看。382231334@qq.com
022021-05-17
相似问题