T
TanStack8mo ago
absent-sapphire

Recursive routing (Seeing if tanstack router works for our project)

In our project we have recursive routes and I can't seem to find an example of it in the docs This isn't our app but it gets the concept across Imagine an app that shows you a person say '/person/$id' Then on that page you can open a sub page in an outlet that shows the details of that first person's child With out existing react-router we can do this and just keep opening subtrees Can you do this in tanstack router and if so can you link me to where I can read about it?
No description
4 Replies
absent-sapphire
absent-sapphire8mo ago
we dont have recursive routes
absent-sapphire
absent-sapphire8mo ago
Code-Based Routing | TanStack Router React Docs
⚠️ Before You Start If you're using , skip this guide. If you are new to TanStack Router, please be aware that file-based routing is the recommended way to configure TanStack Router. If you're not sur...
absent-sapphire
absent-sapphireOP8mo ago
At that point I suspect you lose type safety and can't autocomplete to different routes from one of those recursive routes? person/1/person/2/hobbies or something like that
absent-sapphire
absent-sapphire8mo ago
yes, there wont be autocomplete cc @Chris Horobin any idea if this woud be possible in a typesafe manner? can you please explain how you do it in react-router?

Did you find this page helpful?