Preload query access to resolved ref in TanStack Router

I’m looking to handle setting a page title from data fetched from the loader in TanStack Router much like how it’s done in this repo which is leveraging React Query.

I’m wondering if there’s a method to read the resolved preload query ref outside of React hooks so that I can put title handling at the route level rather than inside component code?

No, at the time that’s not possible. That said, after the ref promise is resolved, that value will be in the cache, so you can use something like client.cache.readQuery to just read it out of the cache.

Ah that could work! Thanks for the suggestion!