Preloaders affecting current route
Describe the bug
Preloading of routes seems to be affecting the currently rendered route. In the codesandbox, there are two routes under an _auth layout route. The _auth.tsx conditionally returns notFound() for the /notFound route and otherwise renders the route.
When you first load the /notFound route, the not found component is rendered as expected. When you hover over the link to /test, you will see the component for the /notFound route is rendered instead of the not found component.
Your Example Website or App
https://codesandbox.io/p/devbox/preload-d7l47f?file=%2Fsrc%2Froutes%2F_auth.tsx%3A9%2C3
Steps to Reproduce the Bug or Issue
- Go to
/notFoundpage. - Should see the not found component being rendered as expected.
- Hover over the Test route link in the header.
- You will see the component for
/notFoundis rendered instead of the not found component.
Expected behavior
Preloading other routes should not affect the current route.
Screenshots or Videos
No response
Platform
- OS: macos
- Browser: Chrome
- Version: 124
Additional context
No response
do you know which version introduced this issue?
Retested the reproduction using 1.52.0 and this issue has been fixed.
https://codesandbox.io/p/devbox/preload-forked-ygvgjq