how to skip in useQueries?
from kappa, "You cannot use "skip" as an argument in useQueries. You must only pass objects for args, and conditionally include queries in the object you pass to useQueries if you want to "skip" them useQueries API." is this true?
3 Replies
Yes it's true. If you look at how
useQuery
implements the skip arg, it's just passing an empty object to useQueries
: https://github.com/get-convex/convex-js/blob/563e75cb7c6b410e3353f8564fa61c6a60fd3362/src/react/client.ts#L675-L684interesting... not sure why im getting "Too many re-renders. React limits the number of renders to prevent an infinite loop." for doing useQueries but 3 useQuery works
I would look at everything useQuery is doing and compare, especially memoization.