diff --git a/README.md b/README.md index 61310fd..ea7ed4b 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,12 @@
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: { + "