N
Nuxt6mo ago
JV

useNuxtApp inside pinia action

Hi, I need to get some data from useNuxtApp() inside pinia action, but it doesn't seems to work. Can I even get somehow NuxtApp inside pinia action please?
2 Replies
Nasr galal
Nasr galal6mo ago
you can access useNuxtApp() in the following locations: - Any Vue component/page - Any Composable function - Any Middleware function so I guess, you may utilize that as it is not possible to use composables outside the specified locations
manniL
manniL6mo ago
if you use a setup store, call it on init (in the defineStore(name, fn() { HERE }
Want results from more Discord servers?
Add your server