T
TanStack3y ago
equal-aqua

Is it possible to display subpath on the root Outlet?

I wonder if there is any way to display a subpath (let’s say /customers/$id) without putting another Outlet in the parent, but using the main one. In the end I want the dynamic path to display instead of the parent Example done in react router: https://stackblitz.com/edit/stackblitz-starters-casmii?file=src%2FApp.tsx
Lorenzo Corallo
StackBlitz
nested routes example - StackBlitz
React + TypeScript starter project
5 Replies
like-gold
like-gold3y ago
hey @Coral were you able to figure this out? In case of Tanner's example the route customers/$customer/profile in router 2 example is not working
equal-aqua
equal-aquaOP3y ago
to solve the issue you can also define each route with parent the root route
like-gold
like-gold3y ago
okay, let me try this approach. Thanks
itchy-amethyst
itchy-amethyst3y ago
any updates ?

Did you find this page helpful?