Relative Content

Tag Archive for vue.jsvuejs3nuxt.jsnuxt3.jspinia

How can I use a custom useFetch composable in a Pinia action?

I am using Vue3 + Nuxt3. My backend API is a separate NestJS project on a separate URL that will also change within environments. Because of this it is best for me to have a custom useFetch composable whenever I am interacting with my API. It works and I have followed the docs in order to do it: https://nuxt.com/docs/guide/recipes/custom-usefetch#custom-usefetchuseasyncdata