NuxtN
Nuxt17mo ago
5 replies
maroo

Is it safe to use useFetch() inside a function?

Is it unsafe to use
useFetch()
inside a function? After making a POST request, the request repeats every time the reactive variable
ref()
is changed within the page. Could this be a bug?

Please refer to the minimal example: https://codesandbox.io/p/devbox/h4cqq2?file=%2Fapp.vue%3A28%2C9
Was this page helpful?