TomT
tRPC3y ago
10 replies
Tom

is there a way to call useQuery() from a callback and get the return value within that callback?

I have a generic component that is effectively an autocomplete that fills in options from a web request. The component takes a callback which takes in the newest search string and should perform a web request to get the autocomplete options and return them. Is there a way I can call a trpc useQuery() and get the return value within this async callback? Thanks.
Was this page helpful?