Page title based on loaderData
Hello, is there any way i can put some data into a title?
In a Route Component u would use
And then - employee.name,
I want the name to be in the title using the Tanners solution with usage of a "head" function.
I am using just TanStack Router not the TanStack Start.

4 Replies
rival-blackOP•7mo ago
As soon as i posted this i figured out a solution, so if someone wonders how to do it:

quickest-silver•7mo ago
why do you have to type cast here?
rival-blackOP•7mo ago
Oh.. you probably don't need to. The loaderData already have the correct type without the "type cast"
quickest-silver•7mo ago
yep