Skip to content

Multiple consecutive redirects not handled consistently between navigations and fetchers #14450

@rossipedia

Description

@rossipedia

Reproduction

Open the reproduction repository in Stackblitz:

https://stackblitz.com/~/github.com/rossipedia/rr-fetcher-redirect-revalidate

  1. Click on "Go to form" link
  2. Click on "Submit with Form"
  3. Observe a new ID is appended to the "ID History" as a result of the loader revalidation
  4. Click on "Go to form" again
  5. Click on "Submit with Fetcher"

System Info

Need to install the following packages:
envinfo@7.18.0
Ok to proceed? (y) 

  System:
    OS: macOS 26.0.1
    CPU: (16) arm64 Apple M4 Max
    Memory: 4.51 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.7.0 - /Users/bryanross/.local/state/fnm_multishells/98221_1760467039698/bin/node
    Yarn: 1.22.22 - /Users/bryanross/.local/state/fnm_multishells/98221_1760467039698/bin/yarn
    npm: 11.5.1 - /Users/bryanross/.local/state/fnm_multishells/98221_1760467039698/bin/npm
    pnpm: 10.18.1 - /Users/bryanross/.local/state/fnm_multishells/98221_1760467039698/bin/pnpm
    bun: 1.3.0 - /opt/homebrew/bin/bun
    Deno: 2.5.4 - /opt/homebrew/bin/deno
  Browsers:
    Chrome: 141.0.7390.77
    Firefox: 143.0.3
    Safari: 26.0.1
  npmPackages:
    @react-router/dev: ^7.9.4 => 7.9.4 
    @react-router/fs-routes: ^7.9.4 => 7.9.4 
    @react-router/node: ^7.9.4 => 7.9.4 
    @react-router/serve: ^7.9.4 => 7.9.4 
    react-router: ^7.9.4 => 7.9.4 
    vite: ^7.1.10 => 7.1.10

Used Package Manager

npm

Expected Behavior

A new ID should be appended after clicking on "Submit with Fetcher", as the final "settled" route should revalidate.

Actual Behavior

The final route's loader is never revalidated, and so no new ID is appended to the list.

From what I can tell, shouldRevalidate receives a different method when using a Fetcher, than when using a <Form>, which causes shouldRevalidate to return false instead of defaultShouldRevalidate.

Additional details are in the README for the source repository.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions