From cb5055d51ac35e4bba3e2f9163dac220ff9a73d9 Mon Sep 17 00:00:00 2001
From: Metin Seylan
Vue-Socket.io is a socket.io integration for Vuejs, easy to use, supporting Vuex and component level socket consumer managements
@@ -88,4 +88,28 @@ this.sockets.subscribe('EVENT_NAME', (data) => { }); this.sockets.unsubscribe('EVENT_NAME'); -``` \ No newline at end of file +``` + +#### 🏆 Vuex Integration +
When you set store parameter in installation, `Vue-Socket.io` will sending events to Vuex store, you can use `actions` and `mutations` in same time if you set both prefix for vuex but best way is use just `actions`
+ +``` javascript +import Vue from 'vue' +import Vuex from 'vuex' + +Vue.use(Vuex) + +export default new Vuex.Store({ + state: {}, + mutations: { + "