non-hook queries in React
Hi is there away for us to use a non-react query in a util function in a react project?
5 Replies
If you've got your https://docs.convex.dev/api/classes/react.ConvexReactClient instance you can call methods on it directly instead of using hooks
Class: ConvexReactClient | Convex Developer Hub
react.ConvexReactClient
or use
useConvex
to get the client from up the tree and use that in callbacksThink I got it
Do you have ar eference for managing loading with convex?
The useQuery hook returns
undefined
while the convex query is loading.
and client.query(api.foo.bar, {})
return a promise which resolves with the query valueGod thank you so much, I love convex just switched over today from supabase and am building out an enterprise application with it