如何制作嵌套的反应路线v4

时间:2018-05-27 19:48:59

标签: reactjs react-router

我感兴趣的是如何在我的反应项目中制作嵌套路线'。 这很难解释,但下面的图片应该说明问题所在: So this is common component with routes, nothing special

So this is the problem, because i want to have my routes in child component too

这是正确的方法还是我必须将我孩子的路线放在父组件中?

1 个答案:

答案 0 :(得分:0)

首先,您应该在问题中包含您的代码而不是图像。

关于你的问题。这似乎是一个完全有效的设置。明显错误的是<BrowserRouter>组件中的Child元素。您应该为每个App定义一个路由器。

相关问题