Vue 2 + Pinia can't access state #1119
Unanswered
Master-Y0da
asked this question in
Help and Questions
Replies: 1 comment
-
Most of the docs try to be coherent to work with both Vue 2 and Vue 3 🙂 . You will find more examples using the composition api though, but you can use that with Vue 2 as well. If you want to stay on the Options API, https://pinia.vuejs.org/core-concepts/state.html#usage-with-the-options-api should help. I tested your code sample in this project: https://github.com/piniajs/example-vue-2-vite and it works fine so you probably have something else affecting it that would be worth sharing |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I spend some hours trying to use pinia on my vue 2 app...and it's not working. I can't log any state on my app because I get undefined. Here:
Store
Component
I don't know why is not working...and pinia page has a lot of documentation about using pinia in vue 3 but not many examples with vue 2. Any help would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions