ctrl-react-web-socket
A React component that abstracts around socket.io-client.
Installation
Yarn is recommended for installation.
$ yarn add --dev ctrl-react-web-socket
$ npm install --save-dev ctrl-react-web-socket
Usage
import WebSocketClient from 'ctrl-react-web-socket'import ReactDOM from 'react-dom' import App from './App.jsx' ReactDOM
App
will inherit a property called webSocket
that contains an emit
method
and an isConnected
state.
Methods
Full documentation to come soon!
License
Copyright (c) 2016 Martin Experiments LLC
MIT (https://www.opensource.org/licenses/MIT)