-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Which project does this relate to?
Router
Describe the bug
__root.tsx is missing notFoundComponent => error message
adding the following code to __root.tsx removes the error message:
notFoundComponent: () => {
return <p>This page doesn't exist!</p>;
},
Your Example Website or App
localhost.com
Steps to Reproduce the Bug or Issue
error appears as soon as app starts
Expected behavior
Error message to disappear:
Warning: A notFoundError was encountered on the route with ID "root", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (
Not Found
)
Screenshots or Videos
No response
Platform
- Router / Start Version: [e.g. 1.121.0]
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Browser Version: [e.g. 91.1]
- Bundler: [e.g. vite]
- Bundler Version: [e.g. 7.0.0]
Additional context
No response
coderabbitai
Metadata
Metadata
Assignees
Labels
No labels