Dynamic Route + Static Match
What would be the best practice to use dynamic routing but also have specific logic for a specific route?
For instance, /$branch/$step maintains top level logic and layout, but I want to do something special if route is /foo/*? I was hoping to separate the logic from the /$branch/$step file.
I have tried /_foo route but get an invariant error at runtime. Ref. https://tanstack.com/router/latest/docs/framework/react/routing/routing-concepts#pathless-layout-routes
Routing Concepts | TanStack Router React Docs
TanStack Router supports a number of powerful routing concepts that allow you to build complex and dynamic routing systems with ease. Each of these concepts is useful and powerful, and we'll dive into...



1 Reply
fascinating-indigo•3mo ago
a complete minimal example would be helpful, can you please fork one of the existing examples (e.g. https://tanstack.com/router/latest/docs/framework/react/examples/quickstart-file-based) for that?