Open Alexlaw6988 opened 2 years ago
Hey! Last time I worked with vue & localstorage together, vue was unable to keep track of changes to localstorage (e.g. the computed property was not updating and showing the latest data in localstorage ). Is this the kind of issue you are facing?
If so, I don’t think it’s a vuex issue but more of a reactivity+localstorage issue. Let me know and I’ll try and give you some suggestions.
Hi @HamadaFMahdi ,
Thanks for your reply,
My issue is only when a new version is installed, if I refresh the browser the problem is resolved.
reproducing steps:
refresh the Browser issue sorted out.(it is reflecting in computed property)
It is happening only when a new release is deployed in server, can we make it reactive in this situation ? with out refreshing the app ?
@Alexlaw6988 why can't this illustrated by way of a reproduction? Until then, there will be very little for the community to offer in terms of help.
That said, generally speaking, when dependencies change they should really promote a refresh. This is beneficial for many reasons I won't go into here. Suffice to say, if your store expects changes beyond the realm of the users current session, I would highly recommend you reload the page.
Hey! Last time I worked with vue & localstorage together, vue was unable to keep track of changes to localstorage (e.g. the computed property was not updating and showing the latest data in localstorage ). Is this the kind of issue you are facing?
If so, I don’t think it’s a vuex issue but more of a reactivity+localstorage issue. Let me know and I’ll try and give you some suggestions.
Hey @HamadaFMahdi, I'm facing this exacly issue. My VUEX state is being updated normally with my local storage. But my Getters do not update and my computed property always get the project info from there. And this causes my app to render the info from one project inside another one.
Do you have any suggestion?
Version
3.1.2
Reproduction link
sfc.vuejs.org/
Steps to reproduce
Hi Team,
I am using the Vue 2 and the following VueX libraries, "vuex": "^3.1.2", "vuex-oidc": "^3.5.1", "vuex-persistedstate": "^2.7.1"
My Issue:
this cannot be reproduced by code pen or sand box .
I am using a microfront-end, some of the modules developed by angular js and some of the modules are developed by vue js user is working on application version-1, meanwhile the version-2 is deployed. if user navigates to a page which is developed by Angular and if he comes back to the pages which is using vue js, I can see all the new changes but when I change the values in vuex. The setter is working (vueX persisted store updating the localstorage) but getter is not (reactive) returning the new value.
What is expected?
the state should be reactive
What is actually happening?
The setter is working (vueX persisted store updating the localstorage) but getter is not (reactive) returning the new value.
if I do a refresh, it is working fine. but I wants to solve without a refresh.
is there anyway to solve the reactive issue of the VueX in this scenario?