#Re execute query with React when parameter change
6 messages · Page 1 of 1 (latest)
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!
The default behavior of useQuery is that it will re-execute when the parameters change, or the underlying data changes. So this happens by default. If you want to hold onto a cache of previous values so switching between tags doesn't re-fetch each time, you can check out https://stack.convex.dev/magic-caching
Thank you @restive bramble, I used usePaginatedQuery so I suppose this is why I wasn't able to see this behaviour without trigger loadMore(). I gonna to refactor my code.
Is it normal usePaginatedQuery not re execute the pagination query when a parameter change ? Thank you
those should also be re-executing on parameter changes. have you gone through the tour yet? would be a good place to start if not https://docs.convex.dev/get-started