[Nuxt 3] How to use Pinia outside of a component? #2379
-
I am trying to use Pinia with Phaser but I can't get it working. So I read the docs but didn't understand. How do I use Pinia in a .ts file outside of the reach of Nuxt? |
Beta Was this translation helpful? Give feedback.
Answered by
posva
Aug 23, 2023
Replies: 1 comment 4 replies
-
Ensure |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
onurusluca
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ensure
app.use(pinia)
is called before anyuseStore()
function is called or manually callsetActivePinia(pinia)
before but you might encounter missing things like plugins. Otherwise, refer to this guide