Option store created in Vue 2 does not update computed value in Vue3 #1839
Unanswered
mcube27
asked this question in
Help and Questions
Replies: 1 comment
-
Using the Pinia/bug-report repository, I could try out. I found out that when you initialize the state like this:
which works fine in Vue 2, you need to add
becomes:
Then it works again |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Reproduction
no
Steps to reproduce the bug
Expected behavior
The counter should update in the component
Actual behavior
The component does not update. Not with ...mapState, nor with setup() option.
Additional information
We have switch from Vuex to Pinia a long time ago with great success while on Vue2.
We are migrating our app, quite a big one, to Vue 3.
Since then, stores do not update their value unless we go to another route and come back. Meaning, the store works but the component can get updated values when change happen.
Beta Was this translation helpful? Give feedback.
All reactions