Skip to content
Discussion options

You must be logged in to vote

Have you had a look at createSubscriber: https://svelte.dev/docs/svelte/svelte-reactivity#createSubscriber

I haven't used it before, least of all for websockets, but I think you will basically do 1) Set up your websocket, 2) Call create subscriber and call its update function when your websocket receives messages, 3) Create a setter that writes to the websocket, and you should be able to bind to it.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hrueger
Comment options

Answer selected by hrueger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants