RwibbyR
Convex Communityโ€ข2mo agoโ€ข
1 reply
Rwibby

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)


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!
Was this page helpful?