You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Step 1: Define a component which uses the route context of the accumulated route (e.g. breadcrumb) on a top-level layout component.
Step 2: navigate to a different route as a child component.
Step 3: Notice that the parent component didn't have an up-to-date copy of the child route context.
Describe the bug
I believe, due to memoization on the Match and MatchInner components, the
useRoute()
hook isn't receiving the routeContext of children correctly.Your Example Website or App
https://stackblitz.com/edit/tanstack-router-bynomg?file=src%2Froutes%2F_layout.tsx
Steps to Reproduce the Bug or Issue
Step 1: Define a component which uses the route context of the accumulated route (e.g. breadcrumb) on a top-level layout component.
Step 2: navigate to a different route as a child component.
Step 3: Notice that the parent component didn't have an up-to-date copy of the child route context.
Expected behavior
The route context should be updated in the parent layout if there are changes in the route at the children's level.
Expected behaviour: https://stackblitz.com/edit/tanstack-router-vllv2a?file=src%2Froutes%2F_layout.tsx
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: