TanStackT
TanStack8mo ago
9 replies
thick-teal

Head data loading => What about streaming head data using deferred external data

Hello,

I have a dynamic route to load a post, and I would like to know if it is possible to use data that is loaded in the loader to integrate them in the head?
For example, I'd like to be able to define the title and canonical URLs in the head using dynamically loaded data.

Another question: in my __root I have two links to change the language. I'd like these links to correspond to the current location of my page, using dynamic parameters associated with the post that's currently visible. How can I do this?

I appreciate your help in advance.
Thank you

My route : /posts/$postId
In $postId route I load my post with all needed data for localization, metadata etc
Was this page helpful?