Vuex changed the value of state, but the page was not updated

A property of state is used in both components. One component modifies this property, but the other component does not update the data

Mar.05,2021

state to use computed return


if you also use getters in data
suggested components in computed store


see if you modify it using the mutations definition method. If not, other components cannot be updated by Synchronize

.
 mutations: {
    increment (state) {
    // 
   state.countPP
  }
}
Menu