Getting error "Component is already mounted" when using "useFetch()" and changing route.

I am getting the error in my console:
[nuxt] [useFetch] Component is already mounted, please use $fetch instead.
[nuxt] [useFetch] Component is already mounted, please use $fetch instead.
This is when using multiple useFetch() in a composable and then navigating to another route. A reproduction can be found here: https://stackblitz.com/edit/github-o9ivmk-bcdf3h?file=layouts%2Fdefault.vue I'm quite sure it has to do with the composable useTwoStepFetch() but unsure how to solve. I cannot change useFetch() to $fetch, because I want the call to be deduped. Any ideas?
H.J. van Meerveld
StackBlitz
Nuxt - Double useFetch -- Component is already mounted - StackBlitz
Create a new Nuxt project, module, layer or start from a theme with our collection of starters.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server