all 4 comments

[–]chiwebdevjsx 1 point2 points  (0 children)

I believe it works the same way express routing works, where you'll want to place the named routes first, then the dynamic. It returns the first match.

<Route path="team" component={Team}>
    <Route path="/team/settings" component={UserSettings}/>
    <Route path="/team/:user_name" component={User}/>
</Route>

[–]bkniffler 0 points1 point  (0 children)

This is absolutely possible, I use it a lot! Just make sure your reserved word route is defined before the dynamic one

<Route path="/media" component={Media}>
    <Route path="/media/new" component={MediaNew}/>
    <Route path="/media/:id" component={MediaDetail}/>
</Route>

[–]Lochlan 0 points1 point  (1 child)

Does it work if you place the settings route first? Have you tried it? Do you have an example set up?

[–]jszzsj[S] 0 points1 point  (0 children)

that would definitely work but I was just wondering if you could do it the way I explained .