Which project does this relate to?#
Router
Describe the bug#
I have both notFoundComponent and errorComponent defined on __root. When there is an error in loader or in child routes components, there is unexpected render of notFound component
Your Example Website or App#
https://stackblitz.com/edit/github-shvffc?file=src%2Froutes%2F__root.tsx
Steps to Reproduce the Bug or Issue#
- define a root route with
notFoundComponent and errorComponent
- throw error in
loader or in component of root or any child component
Expected behavior#
only root's errorComponent will be rendered
Screenshots or Videos#
notFoundComponent is rendered

Platform#
- OS: Windows
- Browser Chrome
- Version: 129.0.6668.90 (Official Build) (64-bit)
Additional context#
No response