-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Vuex State variables doesnt update. It just stays with the initial values. #2046
Comments
i also tried it on Firefox, so i dont think it is browser related. |
Please provide a reproduction of your issue so I can run it and find where the problem is. |
I have a huge app.. i'll try to create a smaller app which reproduces the bug.
My state looks like this. I did it this way so that i can reset to default easily whenever i need to. If this information doesnt help, then let me know and i'll try to create a sample app some time in future if im free. |
What happens if you click on the refresh button on the top right? |
If i click on the refresh button, the state still shows the original value. |
This happens to me too - it makes it really hard to see the "current state" of the store. If I have actions or mutations I can see them in the timeline view, but the inspector always shows me the initial state, not the current state; the refresh button doesn't do anything. This is using: |
@dflock I'm racking my brain trying to find the "force refresh" button. I thought the beta version doesn't have it. How come everybody else have it and I don't? Is the refresh only available for Vuex now? |
@dflock It's referred to as "force refresh" by the core team pretty much everywhere. So I just assumed it's the correct terminology and I think it is correct since it's literally forcing the refresh even though it's supposed to update automatically.
I do know where it's suppose to be and I've used it a lot before because it doesn't update for events that doesn't trigger a re-render. But it's not there anymore. Since Vue 3 for me. 🤔 I just got used to using less and less of Vue devtools because of this issue but I'm doing a massive refactoring right now and this is bothering me very much. |
@m4heshd I guess you are talking about something different. If you have an issue with component data not updating automatically, please open a new issue. In the meantime, you can "force refresh" a component by clicking on it again in the component tree. |
@Akryum OMG thank you. I don't know how I didn't notice that because I tried pretty much everything. This makes my life a lot easier. Awesome. |
Hey guys, Maybe all you other guys can check to see if it works for you now? I'll close this issue in a couple days. |
i see @dflock says he is also using version |
Ok. I know why mine suddenly started working. |
I'm seeing this same behavior (or rather, lack of it) with 6.0.0 beta 14 on both Firefox Developer Edition 90.0b12 (64-bit) and Chrome 91.0.4472.114 (Official Build) (32-bit). In the right-hand pane, "state" only ever shows the initial state, never the current state, and clicking the refresh/force-refresh icon has no effect. In the right-hand pane, "getters" does update in real-time. Perhaps this is expected behavior... in which case "state" should really be renamed to "initial state" or something similar. |
I don't want bring bad notices, but in v6.0.0-beta.15, the problem persist. |
And I still don't have a valid reproduction... |
For me I can confirm the exact same behavior if I use "vuex-persist". As soon as I deactivate the persistence-plugin, dev tools start working correctly. |
Hmmm. I am also using vuex-persist, although unfortunately I don't have time this morning to try without. |
I am using vuex-persistedstate (not vuex-persist) when this behavior occurs. I also have not had time try this morning without. |
I don't use vuex-persist and have the bug. @Akryum Sorry, I don't see if exists a valid reproduction, For me, I use Quasar v2, and I cannot reproduce a SSR project in codesandbox. |
@Akryum I ignore how works the devtools, but I have a curiosity, Import like a Symbol affect the devtools? |
Also replicated when using vuex-persist |
My short term solution is to create a getter that returns the state. getters: {
state(state) {
return state;
}, |
@Akryum I'm able to replicate this with a completely new project. Reproduction StepsProject Setup
File ContentsApp.vue
main.js
Starting the app
Test Steps
Dependency InformationVueJS Dev Tools Version: 6.0.0 beta 15 Package.json dependencies:
NotesAs you can see I've tested this both with namespaced store modules as well as without. Note that I also peformed the same steps with vuex-persist and had the exact same issues however I don't count vuex-persist as a good candidate because when it's strict-mode is turned on it breaks because it is not actually Vue 3 compatible. If I had to pinpoint where the problem was coming from, I'd say it's something to do with |
how to push myself's code to the project |
Is this issue solved? I am using Nuxt and can't seem to get the state to update 😞 |
I gave up and switched to Pinia |
Also encountering this problem. Using |
Same problem using using vuex-persist "vue": "^3.2.27", |
Still an issue to this day. The refresh icon in vue dev tools does nothing. If I manually update a Boolean for example from true to false in an attempt to toggle ui functionality, it does nothing. Eeeesh been a problem forever I see. |
i went to pinia |
same problem |
any updates on this? |
this has started workinng again for me. Not sure how or when. Was it a restart? donno. |
Yes for me it is working too, unless I do anything with replaceState |
im encountering the same issue using |
Same bug |
Version
6.0.0-beta.11
Browser and OS info
MacOS catalina 10.15.4 (19E266) with google chrome Version 90.0.4430.212 (Official Build) (x86_64)
Steps to reproduce
I have to use console.log() as a workaround for me to see the values. I just run the app, and update values in the Vuex Store.
What is expected?
values in state should update
What is actually happening?
values stay the same as default -> https://user-images.githubusercontent.com/18083923/119898167-77304980-bf0f-11eb-8d89-f076e2edec97.png
The text was updated successfully, but these errors were encountered: