-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
Which project does this relate to?
Router
Describe the bug
root pathless notFound is not rendering instead of main.tsx defaultNotFoundComponent is being triggered.
Your Example Website or App
https://github.com/rahulvils/tanstack-router-not-found
Steps to Reproduce the Bug or Issue
- Clone the repository
- Run
pnpm i - Run
pnpm dev - Open
http://localhost:3000in your browser - Click on the Skill Agent button in the home page, You will be redirected to skill-agent page
- Now manually go the the route to trigger not-found component
http://localhost:3000/agents/skill-agen - The not-found component in the
_authenticated/agents/route.tsxwill be triggered (Which is expected) - Now go the location in the codebase
_authenticated/agents/route.tsxand comment thenotFoundComponent - Now navigate to the same link
http://localhost:3000/agents/skill-agethe main.tsx defaultNotFoundComponent is being triggered instead of_authenticated.tsxnotFound component
Expected behavior
For root pathless route (say routes/_authenticated.tsx) the notFound component is not being triggered and main.tsx defaultNotFoundComponent is being triggered. I didn't change the default behaviour of notFoundMode (which is fuzzy)
Screenshots or Videos
No response
Platform
- Router Version: 1.147.0
- OS: Linux (Ubuntu 24.04)
- Browser: Chrome
- Browser Version: 143.0.7499.192 (Official Build) (64-bit)
- Bundler: Vite
- Bundler Version: 7.1.1
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels