Which project does this relate to?
Router
Describe the bug
I'm referencing the documentation for the fuzzy notFoundMode option here: https://tanstack.com/router/latest/docs/framework/react/guide/not-found-errors#notfoundmode-fuzzy.
This is the process it describes for handling a notFound() error:
The nearest suitable route is found using the following criteria:
- The route must have children and therefore an Outlet to render the notFoundComponent
- The route must have a notFoundComponent configured or the router must have a defaultNotFoundComponent configured
For the example from the documentation the described expected behavior is:
The notFoundComponent of the posts route will be rendered because it is the nearest suitable parent route with children (and therefore an outlet) and a notFoundComponent configured.
In testing I'm seeing the notFoundComponent of the $postId route rendered even though it doesn't have children/an Outlet. The actual behavior makes more sense to me than the described behavior, this might be a bug with the documentation or my understanding of it rather than with the library.
Your Example Website or App
https://stackblitz.com/edit/github-b3gtgj-hayvly
Steps to Reproduce the Bug or Issue
- Go to https://stackblitz.com/edit/github-b3gtgj-hayvly
- Click the Posts nav link
- Click any link in the list of post ids
- See that what is rendered is the $postId.notFoundComponent in the Outlet of the posts route.
Expected behavior
In step 4 I expect to see posts.notFoundComponent, not $postId.notFoundComponent.
Screenshots or Videos
No response
Platform
- OS: macOs
- Browser: Firefox
- Version: 1.85.5
Additional context
I searched for and found these related issues, which I believe are describing separate problems:
Which project does this relate to?
Router
Describe the bug
I'm referencing the documentation for the fuzzy
notFoundModeoption here: https://tanstack.com/router/latest/docs/framework/react/guide/not-found-errors#notfoundmode-fuzzy.This is the process it describes for handling a
notFound()error:For the example from the documentation the described expected behavior is:
In testing I'm seeing the
notFoundComponentof the $postId route rendered even though it doesn't have children/an Outlet. The actual behavior makes more sense to me than the described behavior, this might be a bug with the documentation or my understanding of it rather than with the library.Your Example Website or App
https://stackblitz.com/edit/github-b3gtgj-hayvly
Steps to Reproduce the Bug or Issue
Expected behavior
In step 4 I expect to see posts.notFoundComponent, not $postId.notFoundComponent.
Screenshots or Videos
No response
Platform
Additional context
I searched for and found these related issues, which I believe are describing separate problems: