T
TanStack•23h ago
adverse-sapphire

[Help wanted] Nested routes

Looking to setup a few routes which share the same first param, is this possible? Somethig like.. /clients/$clientId.tsx /cilents/$clientId.edit.tsx When trying this above, my edit route kept rendering the $clientId.tsx. Only way I could get this to work was changing to $clientId.view.tsx and $clientId.edit.tsx.
5 Replies
yappiest-sapphire
yappiest-sapphire•22h ago
It is possible. Move your current /clients/$clientId.tsx to /clients/$clientId.index.tsx
adverse-sapphire
adverse-sapphireOP•21h ago
Ahhh, IDK why I didn't thinkk of using index. Tyvm
flat-fuchsia
flat-fuchsia•19h ago
make sure to render an Outlet in the parent route
adverse-sapphire
adverse-sapphireOP•17h ago
Changing to .index.tsx pattern worked immediately 🙂
flat-fuchsia
flat-fuchsia•17h ago
its not the same though its not nested

Did you find this page helpful?