T
TanStack3y ago
ratty-blush

Why does query not re-execute after Key changes?

Using vue-query@4.29 why does this query not refetch when the findOfferForm.zipvalue changes?
const citiesQuery = useQuery({
queryKey: ['getLocationsByZipcode', findOfferForm.zip],
queryFn: () => client.newCustomer.getLocationsByZipcode.query(findOfferForm.zip),
refetchOnWindowFocus: false,
});
const citiesQuery = useQuery({
queryKey: ['getLocationsByZipcode', findOfferForm.zip],
queryFn: () => client.newCustomer.getLocationsByZipcode.query(findOfferForm.zip),
refetchOnWindowFocus: false,
});
1 Reply
ratty-blush
ratty-blushOP3y ago
findOfferForm is a reactive

Did you find this page helpful?