tRPCttRPC
Powered by
makoM
tRPC•3y ago•
7 replies
mako

Skipping useQuery with typescript

I'm wondering if there is a way to skip a query in a typescript friendly way?
rtk-query
rtk-query
has a handy
skipToken
skipToken
that can be used to opt out of the query (https://redux-toolkit.js.org/rtk-query/usage-with-typescript#skipping-queries-with-typescript-using-skiptoken). I see that
tanstack
tanstack
has an
enabled
enabled
option, however, it seems with the trpc react hook API you must still pass a typesafe query input.

Is there anything I'm missing? How is this intended to work?
Usage With TypeScript | Redux Toolkit
RTK Query > TypeScript: Instructions on how to use RTK Query with TypeScript
Usage With TypeScript | Redux Toolkit
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

TRPC useQuery() in NextJS full stack with TypeScript
SophiaSSophia / ❓-help
2y ago
tRPC useQuery with skipToken
lukeLluke / ❓-help
2y ago
useQuery with query params
PuzzlesPPuzzles / ❓-help
3y ago