router
router copied to clipboard
Parent route components rerender when child routes change
Describe the bug
With nested routes, when navigating between child routes within the same parent, or navigating between the same child route with different search params, all of the ancestor route components in the route hierarchy rerender.
Your Example Website or App
https://stackblitz.com/edit/tanstack-router-ayc4dj?file=src/main.tsx
Steps to Reproduce the Bug or Issue
Within the "Home" page I have two links that go the active route with different searches and if you look at the console logs you can see that every level of the route hierarchy is getting remounted.
Expected behavior
Parent route components should not remount when child routes change
Screenshots or Videos
No response
Platform
- OS: macOS
- Browser: Chrome
- Version: 109.0.5414.119
Additional context
"@tanstack/react-router": "0.0.1-beta.80"
This is no longer the case in the latest version.