Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
metinseylan committed Dec 30, 2016
1 parent 8e0100b commit 0c778d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install vue-socket.io --save
```

## Usage
##### Configration
#### Configration
Automaticly socket connect from url string
``` js
Vue.use(VueSocketio, 'http://socketserver.com:1923');
Expand All @@ -32,7 +32,7 @@ import store from './yourstore'
Vue.use(VueSocketio, socketio('http://socketserver.com:1923'), store);
```

##### On Vuejs instance usage
#### On Vuejs instance usage
``` js
var vm = new Vue({
sockets:{
Expand All @@ -52,7 +52,7 @@ var vm = new Vue({
})
```

##### Dynamic socket event listenlers
#### Dynamic socket event listenlers
Create new listenler
``` js
this.$options.sockets.event_name = (data) => {
Expand All @@ -64,7 +64,7 @@ Remove exist listenler
delete this.$options.sockets.event_name;
```

##### Vuex Store integration
#### Vuex Store integration
Example store, socket mutations always have "SOCKET_" prefix
``` js
import Vue from 'vue'
Expand Down

0 comments on commit 0c778d6

Please sign in to comment.