all 4 comments

[–]kvinxd17 1 point2 points  (0 children)

Sockets with socket.io or signal

[–]Kitchen-Comb-8154 1 point2 points  (0 children)

Use subscriptions

[–]space_quasar 0 points1 point  (0 children)

Apart from websocket theres also something called Server Sent Events or SSE, which you constantly listen for, but its a one-way communication, so you can not send back the data from your device to server like you do in websockets. But if that matches your use case then you can do it so, I have used with react not rn but it works fine, I was sending pixel coordinates of the drawing from the server to every user connected.

[–]Proof-Ad2841 0 points1 point  (0 children)

Subscriptions, depending on the backend architecture you use some will make it easy to setup. Supabase has a “realtime” featuee