router
router copied to clipboard
Route.update() does not update state options.
Describe the bug
Using Route.update() does not update options in state, especially staticData.
Your Example Website or App
https://stackblitz.com/edit/tanstack-router-bjnyvy?file=src%2Froutes%2F__root.tsx
Steps to Reproduce the Bug or Issue
- go to reproduction example
- create a route or check the existing root route
- trigger a Route.update({staticData: {someStaticValue: "updated value"})
- The returned object from Root.update() does have the updated options
- The state in the tanstack router devtools, or when retrieved by useMatches or else, does not have the updated options
Expected behavior
The state should update reactively. All components depending on the state (components with useMatches and so on) should rerender and show the updated state options.
Screenshots or Videos
Platform
- OS:macOS
- Browser: Chrome
- Version: 126.0.6478.63
Additional context
No response