-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed as not planned
Description
Which project does this relate to?
Router
Describe the bug
The params is correctly used in beforeLoad for the route the first time it is loaded. The second time the route is loaded, but with another parameter, the beforeLoad-function will use the parameter from the first load again.
Your Example Website or App
https://stackblitz.com/edit/github-hayqaewe?file=src%2Froutes%2Flist_%2F%24number.tsx
Steps to Reproduce the Bug or Issue
- Navigate to "List" in the minimal example
- Select one of the links that goes through the
beforeLoadinsrc/routes/list_/$number.tsx(item 1, 2, 3 or the first 4). - Click "List" in the menu again
- Select another one of the links that goes through the
beforeLoadinsrc/routes/list_/$number.tsx(1-3). Notice that the number on the page does not match the one you clicked.
Expected behavior
As a user, I expected the beforeLoad to use the param from the route I clicked, but instead the param from a previous click was used.
Screenshots or Videos
BeforeLoadBug.mov
Platform
- Router: [1.133.36]
- OS: [macOS]
- Browser: [Edge]
- Browser Version: [142.0.3595.53]
- Bundler: [vite]
- Bundler Version: [7.0.0]
Additional context
Bug appeared when migrating from 1.132.27 to 1.133.36
Metadata
Metadata
Assignees
Labels
No labels