Unclear on how to use Vue.set() with base store state. #1229
Unanswered
chckn33
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on migrating over an existing Nuxt app from Vuex to Pinia, and have been unable to find a way to initialize a store's base state with the Vue.set() method. I tried setting it through an action:
I've also tried setting it in middleware:
However if I try to set an existing state property, that seems to work.
Vue.set(fooStore.bar, 'foo', {bar: 'bar'})
I know that defining the state would be a better option, but at the moment would cause a lengthy rewrite. Is it possible to use
set()
with the base state?Beta Was this translation helpful? Give feedback.
All reactions