What happened to the `enabled` option in useQuery?
I recently noticed that in create-t3-appp v10 I no longer have the boolean
enabled
option available.
I realize there's a been a revamp of the api, I'm just wondering if this is still available through another means? Thanks for the help 🙏
6 Replies
You’re putting it in the wrong place
useQuery() | tRPC
The hooks provided by @trpc/react-query are a thin wrapper around @tanstack/react-query. For in-depth information about options and usage patterns, refer to their docs on queries.
First object is input, second object is options
Thanks @cje, it threw me off because I didn't have any inputs for this particular query, and so the first expected argument (input) is of type
void
-- I'm not quite sure about what to pass as that first argument in this case.
Undefined
That’s a general JS thing
Undefined means the absence of a value
got it thanks!
really appreciate the clarification 🙏