webpack中,按照文档的写法路由不跳转,下面是我的代码:
const App = () => {
return (
Login
)
}
const routes = {
path: '/',
component: App,
chidRoutes: [
{path:'Login', component: 'Login'}
]
}
ReactDOM.render( , document.getElementById('root'))
地址栏输入无效,点击链接报错截图:

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
{path:'Login', component: Login}component后面应该是一个组件,不是一个string