Skip to content

Vuex Store Base State is cached #940

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

Closed
paxcodes opened this issue Mar 28, 2019 · 0 comments
Closed

Vuex Store Base State is cached #940

paxcodes opened this issue Mar 28, 2019 · 0 comments
Labels

Comments

@paxcodes
Copy link

Version

5.0.5

Browser and OS info

Chrome 73 / Mac OS 10.14.4

Steps to reproduce

  1. Visit https://codesandbox.io/s/7172znpwmj and fork
  2. Open the project in a new tab so we can use vue-devtools (In the "Browser" section, beside the URL bar, there's an "Open in New Window" icon.)
  3. Open vue-devtools > Vuex store1. Under getters, totalSleep should be 1.5
  4. Go back to the source code. Open store.js and change line 63 to }, 1); (We want to change totalSleep from 1.5 to something else. In this case, to 2.5)
  5. Save and let it compile.
  6. Go back to the project tab. It should automatically reload. If not, reload the page.
  7. In the page, "Total Sleep" displays 2.5 as expected.

What is expected?

totalSleep in vue-devtools should say 2.5 as it also appears in the page.

What is actually happening?

totalSleep in vue-devtools is still 1.5 although the page is updated to 2.5

Other Info

If I use vue-devtools' force refresh, nothing happens.
If I reload the page, nothing happens.
If I close the tab, open a new tab, load the project, open vue-devtools > Vuex store 1, totalSleep now says 2.5

This may be related to #930 but that one mentions NUXT and actions being committed. My prototype does neither of those things. I didn't want to highjack the ticket.

This might also be related to #935.

1 Sometimes vue-devtools says that "No Vuex store is detected." When this happens, I just reload the page without closing dev-tools and the Vuex store gets detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants