Closed lamle154 closed 1 year ago
Without setup tag
export default { created() { if (!this.$store.hasModule('someModule')) { this.$store.registerModule('someModule', myModule); } }, mounted() { this.myAction(); }, methods: { ...mapActions('someModule', ['myAction']), }, };
Everything work well after hot reloaded
But with setup tag
const store = useStore(myKey); if (!store.hasModule('myModule')) { store.registerModule('myModule', myModule); } const myAction = () => store.dispatch('myModule/myAction'); onMounted(() => { myAction(); });
After hot reloaded _modulesNamespaceMap of store is empty and myAction function working any more
Vue: 3.3.4 Vuex: 4.1.0
Without setup tag
Everything work well after hot reloaded
But with setup tag
After hot reloaded _modulesNamespaceMap of store is empty and myAction function working any more
Vue: 3.3.4 Vuex: 4.1.0