pbeshP
tRPC4y ago
3 replies
pbesh

Recommended way to prefetch client-side

In react-query, you can do
queryClient.prefetchQuery(['todos', input], queryFn)


In trpc, I seem to only have access to the
useQuery
option on my endpoints:

trpc.todos.useQuery(input)


Is there a way to do trpc.todos.prefetchQuery(input) or similar?
Was this page helpful?