-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Which project does this relate to?
Router
Describe the bug
When rapidly navigating between the same param route with different params, an aborted loader request causes the route’s errorComponent to render because useLoaderData() is undefined.
Even though a new loader request is sent and resolves successfully, the route never re-renders and remains stuck in the error state.
This happens during fast navigation and appears to be related to how aborted loader requests are handled.
Your Example Website or App
https://stackblitz.com/edit/vitejs-vite-cwhys51i?file=src%2Fmain.tsx
Steps to Reproduce the Bug or Issue
1. Start on /
2. Click Param 1
3. Quickly click Param 2
4. Quickly click Param 1 again
5. Observe error state
Expected behavior
Aborted loader requests should not trigger errorComponent.
While a new loader request is in flight, the route should remain pending, and once the latest loader resolves successfully, the route should render normally.
Screenshots or Videos
Screen.Recording.2026-01-16.at.00.08.47.mov
Platform
- Router Version: 1.150.0
- OS: macOS
- Browser: Chrome
- Browser Version: 143.0.7499.170 (Official Build) (arm64)
- Bundler: vite
- Bundler Version: 7.3.1
Additional context
This is easy to reproduce with:
• Slow backend responses
• Fast param-based navigation
It looks like an aborted request puts the route into an error state, even though a newer loader request is sent in the background and succeeds.