Can't use Pinia outside a component in js file #952
Unanswered
Seyid-cmd
asked this question in
Help and Questions
Replies: 1 comment 1 reply
-
You should only createPinia once. That is done in the main.ts file, usually. I guess the error happens here because you did not do
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am migrating from vue 4.x to pinia , one of my file needs api key from store .
But i can make it work even if though i follow the Pinia documentation .
here is how i use pinia
// Repository.ts
Expected result : to get the token from the store.
Console error
Beta Was this translation helpful? Give feedback.
All reactions