You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<ahref="https://gitter.im/vue-socket-io-extended/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link"><imgsrc="https://badgen.net/badge/chat/on%20gitter/cyan"alt="Join us Gitter"></a>
*Note:* you have to pass instance of `socket.io-client` as second argument to prevent library duplication. Read more [here](https://github.com/probil/vue-socket.io-extended/issues/19).
@@ -237,10 +238,7 @@ Events can be sent to the Socket.IO server by calling `this._vm.$socket.client.e
237
238
Namespaced modules are supported out-of-the-box. Any appropriately-named mutation or action should work regardless of whether it's in a module or in the main Vuex store.
238
239
239
240
```js
240
-
importVuefrom'vue'
241
-
importVuexfrom'vuex'
242
-
243
-
Vue.use(Vuex);
241
+
import { createStore } from'vuex';
244
242
245
243
constmessages= {
246
244
state: {
@@ -269,7 +267,7 @@ const notifications = {
269
267
},
270
268
};
271
269
272
-
exportdefaultnewVuex.Store({
270
+
exportdefaultcreateStore({
273
271
modules: {
274
272
messages,
275
273
notifications,
@@ -296,11 +294,10 @@ Check the example below:
296
294
```vue
297
295
<!-- App.vue -->
298
296
<script>
299
-
import Vue from 'vue'
300
-
import Component from 'vue-class-component'
297
+
import { Options, Vue } from 'vue-class-component';
301
298
import { Socket } from 'vue-socket.io-extended'
302
299
303
-
@Component({})
300
+
@Options({})
304
301
export default class App extends Vue {
305
302
@Socket() // --> listens to the event by method name, e.g. `connect`
0 commit comments