Cant use pinia outside components. #1157
-
I have been trying to use pinia outside components without success. I have followed the guide from the docs, but the same result. If I follow the steps from the docs, I get into another error, which is: "Cannot access 'App' before initialization". |
Beta Was this translation helpful? Give feedback.
Answered by
posva
Mar 20, 2022
Replies: 1 comment 5 replies
-
You have to make sure any useStore function is called after calling app.use(pinia). Maybe in your code the useStore function is being called before that. |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
StefanGhiban
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have to make sure any useStore function is called after calling app.use(pinia). Maybe in your code the useStore function is being called before that.