You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found some really weird and abnormal behaviour when using vuex-pathify with vuex-persistedstate.
For example if I push something into an array like this this.myPathifyKey.push(someElement) then it will be registered (persisted) by vuex-persistedstate only if it's done in some places, such as in a mounted hook of a component, while if I do the exact same thing inside an event listener for example, then it will not be persisted.
But, if I do this instead this.$store.set('pathifyModule/myPathifyKey', ...myArray)
Then it will be persisted ? Go figure.. could not understand why it's failing in the first instance.
I've initialized vuex-persist in the standard way:
I have two typical vuex modules: [user, nav]
I'm finding that instead of persisting
user.user.firstName
, it is persisting it asuser.firstName
(i.e. one level up).Does pathify normally work with
vuex-persist
and typical vuex modules out of the box, or is there some configuration required?Thanks!
Update I found that if I changeSpoke too soon.user.user
to a unique sub-key name, likeuser.userData
, then it all works as expected.The text was updated successfully, but these errors were encountered: