Hi, I have been trying to fixing this issue for 2 days. It always Triggers Mutation but not actions.
import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex); const roommsgs = { state: { roommsgs: [] }, mutations: { SOCKET_CONNECT(state, status) {}, SOCKET_ROOMCHAT(state, roomchat) { state.roommsgs.push(roomchat); } }, actions: { socket_roomChat: async ({ commit, dispatch }, message) => { dispatch('socket_roomChat', message); commit('SOCKET_ROOMCHAT', message); } }, getters: { getChatByRoom: (state) => (room_name) => { return state.roommsgs.find(roommsgs => roommsgs.roomname === room_name) } } }; const notifications = { state: { notifications: [] }, mutations: { SOCKET_NOTIFICATIONS(state, message) { state.notifications.push({ type: 'notifications', payload: message }); } }, } export default new Vuex.Store({ modules: { roommsgs, notifications, } })
Is there anything else should I consider?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4