Replies: 3 comments 2 replies
-
I can see why you would expect that to to work. The way the type-safe route matching works right now doesn't allow this , since both routes would have the same exact unique navigation identifier (the root path |
Beta Was this translation helpful? Give feedback.
-
Since it's possible to work around this right now, as you mentioned, by turning the wrapping route into a non-path route with |
Beta Was this translation helpful? Give feedback.
-
@vitzalt how are you handling this? Can you please explain. Thank You |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
A route with
path: '/'
cannot be nested inside a route withpath: '/'
.A good usecase for this is if you had a homepage with tabs. The homepage would be an index route, and then one of the tabs would also be an index route. The obvious way to do this would be with two nested index routes, but this shows a console error, and the app shows a blank screen.
Of course the alternative is to use a pathless route, or to just add an
id
. But I think that intuitively you want to add it as an index route, and it seems weird that it would error.Your Example Website or App
https://stackblitz.com/edit/github-entwu2-qyrbic?file=src%2Fmain.tsx
Steps to Reproduce the Bug or Issue
Expected behavior
I expect to be able to nest index routes in a simple usecase.
Screenshots or Videos
Platform
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions