2
0
mirror of https://github.com/tenrok/vue-native-websocket.git synced 2026-06-07 07:42:26 +03:00

Update README

This commit is contained in:
Aaron Chen
2017-06-29 16:07:44 +08:00
parent 96eb7bbfdc
commit ca24960b05
+5
View File
@@ -19,6 +19,11 @@ Automatic socket connection from an URL string
import VueNativeSock from 'vue-native-websocket'
Vue.use(VueNativeSock, 'ws://localhost:9090')
```
Set sub-protocol, this is optional option and default it's ''
``` js
import VueNativeSock from 'vue-native-websocket'
Vue.use(VueNativeSock, 'ws://localhost:9090', 'my-protocol')
```
Enable Vuex integration, where `'./store'` is your local apps store:
``` js