Warning: You should not use <Route component> and <Route children> in the same route; <Route compone
报错Warning: You should not use and in the same route; <Route compone
react 路由之坑,非常坑
当以下情形就会报以上错误,
<Router>
<div className='app'>
<Switch>
{/* 如果路径是/ 就跳转到/home */}
<Redirect exact from='/' to ='/home'></Redire
原创
2021-02-25 17:43:04 ·
1892 阅读 ·
1 评论