JSFiddle - React, Tailwind, and code Playground
by lrvick
JavaScript
if ("WebSocket" in window) {
ws = new WebSocket("ws://beta.tawlk.com);
ws.onmessage = function (evt) {
console.log(evt.data)
};
ws.send('')
} else {
alert("WebSocket not supported");
}