我正在尝试设置一些嵌套路由来添加通用布局。检查代码:
<Router>
<Route component={Layout}>
<div>
<Route path='/abc' component={ABC} />
<Route path='/xyz' component={XYZ} />
</div>
</Route>
</Router>
虽然这工作得很好,但我仍然收到警告:
警告:您不应该在同一路由中使用 <Route component> 和 <Route children>;将被忽略