Warning: You should not use <Route component> and <Route children> in the same route; <Route component> will be ignored warning @ tiny-warning.esm.js:12
但是不影响正常使用
<Switch>
<Redirect path="/" exact={true} to="/index" />
<Route component={Index} path='/'>
<Route path='/index' component={Indexpage}/>
<Route path='/artical' component={ArticalList}/>
</Route>
</Switch>
求大佬讲解一下呀
Route组件不能嵌套使用,react-router 4.0 开始,路由的配置分散到各组件中