Recommended way to prefetch client-side
In react-query, you can do
In trpc, I seem to only have access to the
useQuery
option on my endpoints:
Is there a way to do trpc.todos.prefetchQuery(input)
or similar?2 Replies
See https://trpc.io/docs/v10/invalidateQueries for the react query utils pattern
Our docs on this aren't great right now though
ahhhhh gotcha! I did see useContext kinda worked but couldn't find docs on it. thank you!