TanStackT
TanStack4y ago
1 reply
urgent-maroon

How to use Vue ref value assigned in a useQuery as the enabled option in another useQuery?

vue script setup includes (psuedo code):
const var = ref<string>("")
useQuery function that is passed var and assignes value to var.value
useQuery function that is passed var and has enabled option of var.value !== ""


The second useQuery function runs without the enabled option, but it runs twice (first time is invalid since var is an empty string). However when I add the enabled option it never runs, even though var value is updated by the first useQuery function
Was this page helpful?