Let's say we have this setup
const Parent = () => (
<Switch>
<Route path="/data" component={Child}
</Switch>
)
const Child = () => (
<Switch>
<Route exact path="/" component={SomethingList} />
<Route path="/:id" component={ShowSomething} />
</Switch>
);
When I render parent, I would expect someUrl/data to render SomethingList and someUrl/5 to render ShowSomething. What actually happens is that both render ShowSomething.
How do I get the behavior I'm expecting with react-router v4?