Kernel Panic
How are custom fetches used on a large scale project?
in theory, that should work.
But i still get "
error
[nuxt] A composable that requires access to the Nuxt instance was called outside of a plugin, Nuxt hook, Nuxt middleware, or Vue setup function. This is probably not a Nuxt bug. Find out more at
https://nuxt.com/docs/guide/concepts/auto-imports#vue-and-nuxt-composables
."42 replies
How are custom fetches used on a large scale project?
It's being called on the page
It is done this way to abstract away the need to pass the url on the page. All documentation that i come across is using the '/api/myEndpoint' kind of parameter within the page. If i can localise it to a store, like fetching data, posting data, saving data, all from within the same store, this would be ideal
42 replies
How are custom fetches used on a large scale project?
Just loading the page, i get the error
[nuxt] A composable that requires access to the Nuxt instance was called outside of a plugin, Nuxt hook, Nuxt middleware, or Vue setup function. This is probably not a Nuxt bug. Find out more at https://nuxt.com/docs/guide/concepts/auto-imports#vue-and-nuxt-composables.
But when calling the "refresh" function it works as expected. So it only works on refresh, but i need it loaded async on client side
42 replies