Which project does this relate to?#
Router
Describe the bug#
AbortController signal is not called after pendingMs and user leaves the route.
The following sandbox simulates a long data fetching of 10 seconds when entering profile route
for the profile route and a 5 seconds pendingMs, the signal doesn't get called after 5 seconds.
Your Example Website or App#
https://codesandbox.io/p/devbox/wm3ffd
Steps to Reproduce the Bug or Issue#
- Click on profile link (profile loader will simulate a 10 seconds request)
- Wait for pendingComponent to render (
pendingMs: 5 seconds for testing purposes)
- Click on home link right after pendingComponent renders.
- AbortController signal didn't got called and
profile loader successfully fulfilled (should had been aborted as user left /profile route)
(abortController signal get's called just fine within pendingMs time)
Expected behavior#
When user leaves a route, the abortController property of the loader should be called whenever there's a pending promise on it's loader.
Screenshots or Videos#
No response
Platform#
- OS: macOS
- Browser: Chrome
- Version: 1.89.1
Additional context#
No response
I have same problem.