You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When more than one useFetch is used in a component - only the last one fires and all other calls return null except for the first time the page is loaded.
Additional context
I've only tested fetches in onMounted, but I don't know whether it's relevant to the issue
Logs
No response
The text was updated successfully, but these errors were encountered:
Let me reiterate my comment in the linked discussion. Do not use useFetch within a click handler or equivalent. Like all composables, it must be run within an appropriate context. Issue to follow for adding a guide to composables: #14723.
In your case, use $fetch directly to perform programmatic data fetching.
Environment
Reproduction
https://stackblitz.com/edit/github-2cwqjm-gdnhe4?file=app.vue
Describe the bug
When more than one
useFetch
is used in a component - only the last one fires and all other calls returnnull
except for the first time the page is loaded.Additional context
I've only tested fetches in
onMounted
, but I don't know whether it's relevant to the issueLogs
No response
The text was updated successfully, but these errors were encountered: