Constant useStore undefined? #1261
-
I'm having trouble figuring out when constants for stores become usable. In a child component, I'm using setup() to define constants for two Pinia stores (Pinia is already loaded in the root instance). I then have a method If I use the So is there a way to ensure that the constant will work in situations like this? What are the rules governing when it is available and when it is not? Mixing constants and full methods for the same thing in the same component feels messy. I don't recall having this type of issue with Vuex.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It’s this.userStore |
Beta Was this translation helpful? Give feedback.
It’s this.userStore
You should use mapStores btw