Make Somata service calls and subscriptions from the browser using native WebSocket (which means it works with React Native). Pairs well with somata-websocket-server. Remote calls and subscriptions are returned as Kefir streams.
npm install somata-websocket-client
Create a client by providing the connection address. Use
client.connected$ to wait until the connection is established.
somata = require'somata-websocket-client'client = somata'ws://192.168.0.115:5555'clientconnected$onValue ->clientremote'hello''sayHello'onValueconsolelog responseclientsubscribe'announcer''announce'onValueconsolelog announcement