Rwibby
Rwibby5d ago

isPending not running on query

Hey everyone, I'm running convex on a VueJS app. My app has a view component that is shared across several routes. I'm fetching some data using convex-vue like this:
import { useConvexQuery } from 'convex-vue'
import { api } from '@root/convex/_generated/api'

const queryArgs = computed(() => {
table: 'orders',
symbol: route.params.symbol
})

const { data, isPending } = useConvexQuery(api.orders.getOrderBySymbol, queryArgs)
import { useConvexQuery } from 'convex-vue'
import { api } from '@root/convex/_generated/api'

const queryArgs = computed(() => {
table: 'orders',
symbol: route.params.symbol
})

const { data, isPending } = useConvexQuery(api.orders.getOrderBySymbol, queryArgs)
But when I navigate from view to view and args are changed, I've noticed that isPending only runs when the component is first mounted. It doesn't run when I change the view, even though data is updated. Should isPending run every time the data is fetched? Thanks in advance!
1 Reply
Convex Bot
Convex Bot5d 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!

Did you find this page helpful?