Reputation: 35904
I have the following:
<Route path="things/:id" component={...}>
<Route path="thing-types" component={…} />
</Route>
When I build the <Link to="thing-types">
I end up with /things/thing-types
instead of things/100/thing-types
Upvotes: 0
Views: 198
Reputation: 35904
Turns out <Link>
isn't as smart as I thought it was. I had to modify to:
<Link to={`/things/${thing.id}/thing-types`}>Thing Types</Link>
Upvotes: 1