All Projects → mehmetkose → React Websocket

mehmetkose / React Websocket

Licence: mit
Easy-to-use React component for websocket communications.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Websocket

Hprose Nodejs
Hprose is a cross-language RPC. This project is Hprose 2.0 for Node.js
Stars: ✭ 297 (-10%)
Mutual labels:  websocket
Socket Mqtt
基于Netty+MQTT的高性能推送服务框架。支持普通Socket、MQTT、MQTT web socket协议。非常方便接入上层业务实现推送业务。
Stars: ✭ 314 (-4.85%)
Mutual labels:  websocket
Java Spring Cloud
Distributed tracing for Spring Boot, Cloud and other Spring projects
Stars: ✭ 326 (-1.21%)
Mutual labels:  websocket
Vue Project
基于vue-cli构建的财务后台管理系统(vue2+vuex+axios+vue-router+element-ui+echarts+websocket+vue-i18n)
Stars: ✭ 301 (-8.79%)
Mutual labels:  websocket
Monibuca
🧩 Monibuca is a Modularized, Extensible framework for building Streaming Server
Stars: ✭ 307 (-6.97%)
Mutual labels:  websocket
Laravel S
LaravelS is an out-of-the-box adapter between Swoole and Laravel/Lumen.
Stars: ✭ 3,479 (+954.24%)
Mutual labels:  websocket
Microwebsrv2
The last Micro Web Server for IoTs (MicroPython) or large servers (CPython), that supports WebSockets, routes, template engine and with really optimized architecture (mem allocations, async I/Os). Ready for ESP32, STM32 on Pyboard, Pycom's chipsets (WiPy, LoPy, ...). Robust, efficient and documented!
Stars: ✭ 295 (-10.61%)
Mutual labels:  websocket
Stompjs
Javascript and Typescript Stomp client for Web browsers and node.js apps
Stars: ✭ 324 (-1.82%)
Mutual labels:  websocket
Mmorpg
springboot编写的轻量级高性能mmorpg手游服务端框架,基本功能逐渐完善中。
Stars: ✭ 309 (-6.36%)
Mutual labels:  websocket
Shadowfax
Run Laravel on Swoole.
Stars: ✭ 325 (-1.52%)
Mutual labels:  websocket
Python Slack Sdk
Slack Developer Kit for Python
Stars: ✭ 3,307 (+902.12%)
Mutual labels:  websocket
Websockex
An Elixir Websocket Client
Stars: ✭ 305 (-7.58%)
Mutual labels:  websocket
Simps
🚀 A simple, lightweight and high-performance PHP coroutine framework.
Stars: ✭ 318 (-3.64%)
Mutual labels:  websocket
Websocket Client
🔧 .NET/C# websocket client library
Stars: ✭ 297 (-10%)
Mutual labels:  websocket
Ttyd
Share your terminal over the web
Stars: ✭ 4,030 (+1121.21%)
Mutual labels:  websocket
Websocketlistener
A lightweight and scalable asynchronous WebSocket listener
Stars: ✭ 295 (-10.61%)
Mutual labels:  websocket
Websockets
Library for building WebSocket servers and clients in Python
Stars: ✭ 3,724 (+1028.48%)
Mutual labels:  websocket
Redux Requests
Declarative AJAX requests and automatic network state management for single-page applications
Stars: ✭ 330 (+0%)
Mutual labels:  websocket
Swoole Src
🚀 Coroutine-based concurrency library for PHP
Stars: ✭ 17,175 (+5104.55%)
Mutual labels:  websocket
Message Io
Event-driven message library for building network applications easy and fast.
Stars: ✭ 321 (-2.73%)
Mutual labels:  websocket

react-websocket contributions welcome FOSSA Status

react-websocket is a easy-to-use React component for websocket communications.

Help Wanted

Things here are running very slowly as I have a lot of other stuff to take care at the moment so please don't be upset if I don't answer your question or if a PR sits unreviewed for a few days or weeks. Anyone interested in helping it move faster can help by submitting or reviewing PR's and answering each other's questions.

Installing

npm install --save react-websocket

Usage

  import React from 'react';
  import Websocket from 'react-websocket';

  class ProductDetail extends React.Component {

    constructor(props) {
      super(props);
      this.state = {
        count: 90
      };
    }

    handleData(data) {
      let result = JSON.parse(data);
      this.setState({count: this.state.count + result.movement});
    }

    render() {
      return (
        <div>
          Count: <strong>{this.state.count}</strong>

          <Websocket url='ws://localhost:8888/live/product/12345/'
              onMessage={this.handleData.bind(this)}/>
        </div>
      );
    }
  }

  export default ProductDetail;

Properties

url

required The url the websocket connection is listening to.

onMessage

required The callback called when data is received. Data is JSON.parse'd

onOpen

The callback called when the connection is successfully opened.

onClose

The callback called when the connection is closed either due to server disconnect or network error.

debug

default: false Set to true to see console logging

reconnect

default: true

accelerated reconnection time

License

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].