Skip to content

AbortController signal is not called after pendingMs #3014

@cesardeazevedo

Description

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

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions