We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello
How use Dynamic Listeners in app if use Vuex?
main.js Vue.use(new VueSocketIO({ debug: true, connection: 'http://localhost:8888', vuex: { store, actionPrefix: 'socket_', mutationPrefix: 'SOCKET_' } }))
Vue.use(new VueSocketIO({ debug: true, connection: 'http://localhost:8888', vuex: { store, actionPrefix: 'socket_', mutationPrefix: 'SOCKET_' } }))
App.js created () { this.sockets.subscribe('EVENT_NAME', (data) => { this.msg = data.message; }); }
created () { this.sockets.subscribe('EVENT_NAME', (data) => { this.msg = data.message; }); }
[Vue warn]: Error in created hook: "TypeError: this.sockets is undefined"
If I use this.$socket, I see the same problem
The text was updated successfully, but these errors were encountered:
hello @neonkaafi plugin mixin, using created method for setting variables, you need to use beforeMount or mounted hooks
created
beforeMount
mounted
Sorry, something went wrong.
variable this.sockets don't have in beforeMount or mounted because block if(this.$options.sockets) in mixin.js doesn't work
if(this.$options.sockets)
update mixin for #168
176c060
update mixin for MetinSeylan/Vue-Socket.io#168
e0568c1
MetinSeylan
No branches or pull requests
Hello
How use Dynamic Listeners in app if use Vuex?
main.js
Vue.use(new VueSocketIO({ debug: true, connection: 'http://localhost:8888', vuex: { store, actionPrefix: 'socket_', mutationPrefix: 'SOCKET_' } }))
App.js
created () { this.sockets.subscribe('EVENT_NAME', (data) => { this.msg = data.message; }); }
[Vue warn]: Error in created hook: "TypeError: this.sockets is undefined"
If I use this.$socket, I see the same problem
The text was updated successfully, but these errors were encountered: