Slade_Wilson118
Slade_Wilson1183mo ago

React query disadvantages

Hi, I'm still unsure about using React Query in my project because I don't know if it works well with Convex yet. For example, if I use it, will I need to handle cache invalidation myself, or does Convex take care of that? I'm still a bit confused. What are the disadvantages of using React Query with Convex?
8 Replies
Convex Bot
Convex Bot3mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
jamwt
jamwt3mo ago
@Slade_Wilson118 hi! nope, you don't need to worry about caching
Slade_Wilson118
Slade_Wilson118OP3mo ago
Thanks 🫡
ballingt
ballingt3mo ago
The main disadvantage is that our docs assume you're using the normal Convex React client libraries, so you'll have to translate some. There's not much of an advantage unless you're already familiar with React Query and want to use that interface; if you don't feel strongly about that, it's probably simple to use normal Convex React hooks. As Jamies points out below, you do get query caching for free with React Query, which is real nice!
jamwt
jamwt3mo ago
well, unless you're using the thing from convex helpers, the normal hooks don't cached subscriptions, right? that is one thing you get out of the box with react-query
ballingt
ballingt3mo ago
If you do use React Query, let me know! here or filing issues on https://github.com/get-convex/convex-react-query
Slade_Wilson118
Slade_Wilson118OP3mo ago
👍

Did you find this page helpful?