-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Open
Labels
Description
Reproduction
https://stackblitz.com/edit/github-g8dxfe6q-pglgvmkd?file=react-router.config.ts
Changing the value of unstable_middleware
to true results in the parent-loader
to always fire. When middleware is disabled, it only fires on the initial page load.
System Info
System:
OS: macOS 15.6.1
CPU: (14) arm64 Apple M3 Max
Memory: 404.39 MB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.4.0 - /opt/homebrew/bin/node
npm: 11.4.2 - /opt/homebrew/bin/npm
pnpm: 10.6.2 - /opt/homebrew/bin/pnpm
Browsers:
Chrome: 139.0.7258.139
Edge: 139.0.3405.119
Safari: 18.6
npmPackages:
@react-router/dev: ^7.8.2 => 7.8.2
@react-router/node: ^7.8.2 => 7.8.2
@react-router/serve: ^7.8.2 => 7.8.2
react-router: ^7.8.2 => 7.8.2
vite: ^6.3.3 => 6.3.5
Used Package Manager
pnpm
Expected Behavior
Clicking the "Go to next child" link should not trigger a revalidation of the parent-loader
Actual Behavior
The parent-loader
is being revalidated, as can be seen in the terminal console.log
s
Important: this behavior only occurs when unstable_middleware
is set to true
in react-router.config.ts
joseph0926