export const useUserStore = defineStore("userStore", (context) => {
// Global Store scope
const nuxtApp = useNuxtApp()
console.log(nuxtApp.$apiFetch); // undefined
async function Fetch() {
// function scope
const nuxtApp = useNuxtApp()
await nuxtApp.$apiFetch() // working
}
});
export const useUserStore = defineStore("userStore", (context) => {
// Global Store scope
const nuxtApp = useNuxtApp()
console.log(nuxtApp.$apiFetch); // undefined
async function Fetch() {
// function scope
const nuxtApp = useNuxtApp()
await nuxtApp.$apiFetch() // working
}
});