-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(warn): improve getActivePinia warning
- Loading branch information
Showing
1 changed file
with
2 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4640f09
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had this error yesterday, but it was because I was trying to use a store in a composable. There were 2 functions in the file that would need the store, so I called useStore at the top of the file, because of the error, which took me a while to figure out, I had to call useStore inside of each function, not the best solution but that's what I thought of at the time.
Anyway, I'm saying this to point out, that a question about using a store outside of a component should be added to the error message, I hope this makes sense.