The view is not updated after the state change of vuex

that is, two independent routes correspond to two independent components, two components that are neither father and son nor sibling, the browser opens two routes to add data to the b component, and then wants to update the data in component a when Synchronize responds to the updated data, but my code component a does not respond.
the browser and eslint do not report that someone else is running my code and saying that it can be updated, but I But not on my own computer. I manually changed the data in state, component a was updated, but the data component an added through component b was not updated. I added console.log (state.list) to the ADD of mutation and was able to output the latest data in component b every time I added data to component b, but component a just didn"t respond for two days, just didn"t solve this question. I packed the src directory and put it in Baidu Cloud. Can you help me see what the problem is? is it a code problem or something else? thank you
Baidu Cloud

.

A component

<template>
   <div>
     <ul>
       <li v-for="(item, index) in list" :key="index">{{item}}</li>
     </ul>
   </div>
</template>

<script>
export default {
  name: "A",
  computed: {
    list () {
      return this.$store.state.list
    }
  }
}
</script>

<style scoped>
</style>

component B

<template>
  <div>
    <input type="text" v-model="msg">
    <button @click="add"></button>
  </div>
</template>

<script>
export default {
  name: "B",
  data () {
    return {
      msg: ""
    }
  },
  methods: {
    add () {
      this.$store.dispatch("add", this.msg)
    }
  }
}
</script>

<style scoped>
</style>

store.js

import Vue from "vue"
import Vuex from "vuex"
Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    list: ["a", "b"]
  },

  mutations: {
    ADD (state, msg) {
      state.list.push(msg)
      console.log(state.list)
    }
  },

  actions: {
    add (context, msg) {
      context.commit("ADD", msg)
    }
  }
})

export default store
Aug.09,2021

should not use dispatch, you should use commit
try it


this is cross-page, Store can only share on the same page


look at my code and see if it helps https://pan.baidu.com/s/1-R0m.


do you mean to open two windows? do you want two windows to communicate with each other? these are two completely independent. There are also two sets of programs to be executed, which are meaningless

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea631b-1db4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea631b-1db4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?