Which project does this relate to?
Router
Describe the bug
When navigating to a route, matches does not have contain the loaderData or context properties the first time head is called. So in my StackBlitz example, if you navigate directly to the route, the title doesn't update because loaderData is not defined.
Complete minimal reproducer
https://stackblitz.com/edit/github-qkpldktp
Steps to Reproduce the Bug
- Click "Open preview in new tab"
- Click "Connect to Project"
- Go to
nested/even/more/nested
- See the console logs that loaderData is not present on any of the matches
Expected behavior
I expect that the loaderData and/or context property is present on matches from the head argument. That should also cause the title of the browser tab to become: "Nested - More - Even - Nested - Company Inc."
Screenshots or Videos
No response
Platform
- Router / Start Version: 1.169.2
- OS: macOS
- Browser: Chrome
- Browser Version: 148.0.7778.97 (Official Build) (arm64)
- Bundler: Vite
- Bundler Version: 8.0.12
Additional context
My use case is that I may want some value from some query data that I'm loading in the loader property to show in the title and I want to dynamically "stack" to make a sort of breadcrumb in the title.
Which project does this relate to?
Router
Describe the bug
When navigating to a route,
matchesdoes not have contain theloaderDataorcontextproperties the first time head is called. So in my StackBlitz example, if you navigate directly to the route, the title doesn't update becauseloaderDatais not defined.Complete minimal reproducer
https://stackblitz.com/edit/github-qkpldktp
Steps to Reproduce the Bug
nested/even/more/nestedExpected behavior
I expect that the
loaderDataand/orcontextproperty is present onmatchesfrom the head argument. That should also cause the title of the browser tab to become: "Nested - More - Even - Nested - Company Inc."Screenshots or Videos
No response
Platform
Additional context
My use case is that I may want some value from some query data that I'm loading in the
loaderproperty to show in the title and I want to dynamically "stack" to make a sort of breadcrumb in the title.