devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Vuex state is not being updated by the inspector when changed, but getters are

Open AverageCakeSlice opened this issue 2 years ago • 2 comments

Version

6.2.1

Browser and OS info

Chrome 103 / macOS Monterey 12.4

Steps to reproduce

  • Create and run a Vue 3 (Vue 3.2.31-3.2.33, in my case) project using the Vue CLI, install Vuex as part of the process.
  • Add some state to your Vuex store, add a mutator and an action.
  • Dispatch the action within a component to alter the state.
  • Monitor the state in the Vuex plugin for Dev Tools
  • (Optional) Create a getter that uses the state you're modifying, and note how the changes for the getter do show, but the changes for the state do not.

What is expected?

The inspector should display the current state of the application, not what the state was initialized to.

What is actually happening?

The Vuex state inspector only shows the initial/default values. When the state changes, the inspector does not pick up on the new values, even when manually refreshing. Getters, however, are updated correctly in the inspector.


This has been an issue across a couple of projects that I have. One is running Vue 3.2.31, the other is running Vue 3.2.33. Both are having this same issue.

AverageCakeSlice avatar Jul 20 '22 03:07 AverageCakeSlice

I should also mention that I'm using Vuex 4.0.2

AverageCakeSlice avatar Jul 20 '22 03:07 AverageCakeSlice

Me too but without Vuex, just Vue 3 by cdn (without vue cli, node, etc).

The data values is not being updated. Only if i press the update button. With vue 2 work ok!

Vue 3, Firefox 102.0.1 (64-bit), Windows 11

alejoasotelo avatar Jul 20 '22 14:07 alejoasotelo