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
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 locationsif you use a setup store, call it on init (in the
defineStore(name, fn() { HERE }