arlac77 / svelte-websocket-store

svelte store with a websocket backend
BSD 2-Clause "Simplified" License
286 stars 21 forks source link

Online status #535

Open jesperordrup opened 2 years ago

jesperordrup commented 2 years ago

Any way to show a status if websocket is open or closed to allow for an alert in ui?

arlac77 commented 2 years ago

A 2nd. store providing the state of the web socket ?

const myStore = websocketStore("wss://mydomain.com/ws1");

const webSocketState = myStore.state;

could be implemented

jesperordrup commented 2 years ago

That's elegant. Of course