Skip to content

TypeError: Cannot read properties of undefined (reading '$pinia') #2257

Closed Answered by posva
liyuan1125 asked this question in Help and Questions
Discussion options

You must be logged in to vote

mapActions() are for options API. Check https://pinia.vuejs.org/core-concepts/#using-the-store, you just need to call useAppStore() instead.

BTW don't pass the generics to defineStore(), pinia infers the types for you 😉

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by liyuan1125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants