-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Closed
Description
I'm using React Router as a...
framework
Reproduction
- Go to https://stackblitz.com/github/jrestall/react-router-bug/tree/main?file=README.md
- Open site and get automatically redirected to /login for your convenience.
- Note that the root loader data myData is Hello.
- Click 'submit', note that myData is empty.
- Install react-router 7.5.0 instead and reload site and steps.
- Note that the root loader data is not cleared when a error is thrown.
System Info
System:
OS: macOS 11.7.10
CPU: (8) x64 Intel(R) Core(TM) i7-4750HQ CPU @ 2.00GHz
Memory: 187.81 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 21.1.0 - /usr/local/bin/node
Yarn: 1.22.13 - /usr/local/bin/yarn
npm: 10.2.0 - /usr/local/bin/npm
pnpm: 10.6.1 - ~/Library/pnpm/pnpm
Browsers:
Brave Browser: 133.1.75.175
Chrome: 135.0.7049.115
Safari: 16.6.1
npmPackages:
@react-router/dev: 7.5.1 => 7.5.1
@react-router/node: 7.5.1 => 7.5.1
@react-router/serve: 7.5.1 => 7.5.1
react-router: 7.5.1 => 7.5.1
vite: ^5.4.11 => 5.4.18
Used Package Manager
npm
Expected Behavior
The root loader data isn't cleared when an action throws an error and is available in the root error boundary. 7.5.0 behavior.
Actual Behavior
In 7.5.1 the root loader data is cleared on a thrown action error and is not accessible from the root error boundary.
brophdawg11