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

[Bug]: Redirect on loader causes action fetcher state to be stuck in 'loading' #11235

Open
gatzjames opened this issue Jan 30, 2024 · 1 comment
Labels

Comments

@gatzjames
Copy link

What version of React Router are you using?

6.21.3

Steps to Reproduce

  • Create a loader that redirects to another path if some resource doesn't exist e.g. /product/:id
  • Create a fetcher that calls an action that deletes the resource
  • Navigate to /product/:id and call the fetcher that deletes the resource.
  • The fetcher is stuck in a 'loading' state

Example codesandbox with reproduction of the issue

Expected Behavior

The fetcher that calls the action should have a state of 'idle' when everything is completed.

Actual Behavior

The fetcher is stuck in a 'loading' state

@gatzjames gatzjames added the bug label Jan 30, 2024
@wolthers
Copy link

wolthers commented Apr 8, 2024

Here's another reproduction that I think is the same issue in Remix: https://stackblitz.com/edit/remix-run-remix-gslrhe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants