taro-sockjs-client

sockjs-client for Taro

Usage no npm install needed!

<script type="module">
  import taroSockjsClient from 'https://cdn.skypack.dev/taro-sockjs-client';
</script>

README

taro-sockjs-client

sockjs-client for Taro

install(安装)

npm:

    npm install taro-sockjs-client

yarn:

    yarn add taro-sockjs-client

How to use(使用)

import { Stomp } from '@stomp/stompjs'
import SockJS from 'taro-sockjs-client'

const sock = new SockJS(url)
const client = Stomp.over(sock)
client.connect({}, onConnected, onError)