-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Closed
Description
I'm using React Router as a...
framework
Reproduction
- Open StackBiltz project
- Click "Page 1" link
- Refresh page
- Click "Next"
- See that page navigates to
/2, but component does not re-load
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.20.3 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
@react-router/dev: * => 7.2.0
@react-router/node: * => 7.2.0
@react-router/serve: * => 7.2.0
react-router: * => 7.2.0
vite: ^6.0.11 => 6.2.0Used Package Manager
npm
Expected Behavior
SPA transitions between the same pre-rendered route with updated params should re-invoke the route's loader and re-render the route component with the new loader result.
Actual Behavior
While the URL updates as expected, the pre-rendered route is re-rendered with the first page's loader data.
This seems to be scoped to pre-rendered routes in SPA mode (ssr: false) with a loader function, and it seemed to regress around v7.2.0.
betothewizard