Can you ensureData without the useUtils hook?
The Tanstack Router docs recommend calling
https://tanstack.com/router/v1/docs/guide/external-data-loading#a-more-realistic-example-using-tanstack-query
As far as I can tell,
ensureQueryData in a route’s loader function if using Tanstack Query:https://tanstack.com/router/v1/docs/guide/external-data-loading#a-more-realistic-example-using-tanstack-query
As far as I can tell,
ensureQueryData is only available through the trpc useUtils hook in a component. Can I get it, or the full query options, some other way?To Store or to Coordinate?
Solution
I had the same problem so in v11 there's createQueryUtils which allows you to do it without the hook