README
Socket Client
Welcome!
Communication
- If you need help or have a general question, contact
Install Socket Client SDK
npm install socketclient-vue
How to use SocketClient Vue
SocketClient Vue must be installed like a plugin.
import Vue from 'vue';
import SocketClientVue from 'socketclient-vue';
import App from './App';
Vue.use(SocketClientVue, { subscribeKey: 'YOUR SUBSCRIBE KEY HERE', socketDomain: 'YOUR SOCKET DOMAIN HERE' });
new Vue({
el: '#app',
template: '<App/>',
components: { App },
});
Where subscribe
Use the hook mounted to subscribe channels using $scSubscribe method
export default {
name: 'app',
mounted() {
this.$scSubscribe({ channels: 'ch1 });
},
};