Skip to content

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

Closed
@gatzjames

Description

@gatzjames

What version of React Router are you using?

Tested on 6.21.3 and 7.1.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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions