Skipping useQuery calls
Hey everyone, Need urgent help. So i am trying to fecth user details and for that I need to pass kindergarten login user details to getUser api.. below is my code .. but Covex thought error bcs email is undefined when it call first time bcs kinde user details take some time to fecth user details.. so how to solve this problem.. how to wait until i get user info and then only execute useQuery
3 Replies
Welcome! You can pass the string "skip" instead of an arguments object to
useQuery()
to skip execution.Here's the doc: https://docs.convex.dev/client/react#skipping-queries
Convex React | Convex Developer Hub
Convex React is the client library enabling your React application to interact
Ok I will try jt . Thanks for quick response