Single app with conditional Route trees #2936
robertteevans
started this conversation in
General
Replies: 1 comment
-
can you please describe your use case in more detail? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on a single web application that needs to support both mobile and desktop experiences, but the requirements differ so significantly that I have two distinct sets of routes—one for mobile and one for desktop. I'd like to avoid making a separate app. Is there a recommended pattern for conditionally choosing between these two route trees at the root level based on the user's device type? I'd like to maintain all the great developer experience benefits—such as automatic route generation—provided by TanStack Router. Ideally, the CLI could intelligently detect the file being updated and know which route tree to update/generate (mobile vs desktop). Any guidance or best practices would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions