Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbortController signal is not called after pendingMs #3014

Open
cesardeazevedo opened this issue Dec 15, 2024 · 0 comments
Open

AbortController signal is not called after pendingMs #3014

cesardeazevedo opened this issue Dec 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cesardeazevedo
Copy link

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

  1. Click on profile link (profile loader will simulate a 10 seconds request)
  2. Wait for pendingComponent to render (pendingMs: 5 seconds for testing purposes)
  3. Click on home link right after pendingComponent renders.
  4. 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

@schiller-manuel schiller-manuel added the bug Something isn't working label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants