React library for ux4iot for easily building IoT web applications

Overview

ux4iot-react

Streaming live data from an azure iothub can be a lot of work. ux4iot solves this problem by providing a service, easy to deploy and use, to interact frictionless with your Azure IoTHub. Use the hooks in this library to implement your use cases for live data and device methods. As an example: Using live data in your react application will be as easy as writing

const myTelemetry = useSingleTelemetry('myDevice', 'myTelemetry');

in your react components.

This library provides hooks for:

  • useTelemetry - Subscribe to telemetry of multiple devices
  • useSingleTelemetry - Subscribe to a single telemetry key of a device
  • useDeviceTwin - Subscribe to device twin changes of a device
  • useConnectionState - Subscribe to connection state updates of a device
  • useDirectMethod - Execute a direct method on a device
  • usePatchDesiredProperties - Update the desired properties of a device
  • useD2CMessage - Use the raw messages sent by your devices

Installation

npm install ux4iot-react

Check out the Documentation for

  • Additional options
  • Hook API
  • ux4iot API
  • reference to other related libraries of the ux4iot service
You might also like...
RTConnect is an easy-to-use React component library that enables developers to set up live, real-time video calls, between multiple connected peers on different computers
RTConnect is an easy-to-use React component library that enables developers to set up live, real-time video calls, between multiple connected peers on different computers

RTConnect is an easy-to-use React component library that enables developers to set up live, real-time video calls, between multiple connected peers on different computers in a React app.

Simple and elegant component-based UI library
Simple and elegant component-based UI library

Simple and elegant component-based UI library Custom components • Concise syntax • Simple API • Tiny Size Riot brings custom components to all modern

A tiny ( 1KB) reactivity library

influer A tiny ( 1KB) reactivity library yarn add influer Introduction influer is a tiny reactivity library. Exported in ESM, CJS, and IIFE, all 1K

Fire7 is a small library that implements real-time data binding between Firebase Cloud Firestore and your Framework7 app.

Fire7 is a small library that implements real-time data binding between Firebase Cloud Firestore and your Framework7 app.

A lightweight library to create reactive objects

Reactivity As the name says, Reactivity is a lightweight javascript library to create simple reactive objects. Inspired in Redux and Vuex Get started

A blazing fast, dependency free, 1kb runtime type-checking library written entirely in typescript, meant to be used with it.
A blazing fast, dependency free, 1kb runtime type-checking library written entirely in typescript, meant to be used with it.

A blazing fast, dependency free, 1kb runtime type-checking library written entirely in typescript, meant to be used with it.

A tiny library aims to parse HTML to Figma Layer Notation and do it well.

TSDX User Guide Congrats! You just saved yourself hours of work by bootstrapping this project with TSDX. Let’s get you oriented with what’s here and h

A tiny, reactive JavaScript library for structured state and tabular data.

A JavaScript library for structured state. Using plain old JavaScript objects to manage data gets old very quickly. It's error-prone, tricky to track

React ESI: Blazing-fast Server-Side Rendering for React and Next.js
React ESI: Blazing-fast Server-Side Rendering for React and Next.js

React ESI: Blazing-fast Server-Side Rendering for React and Next.js React ESI is a super powerful cache library for vanilla React and Next.js applicat

Comments
  • Fix retry timeout on socket server error

    Fix retry timeout on socket server error

    Previously we just had a restart mechanism in place to resubscribe in case of server disconnect events. If the server threw an error we didnt subscribe after the server was restarted. This fix resubscribes all registered subscriptions, regardless of the reason, the ux4iot server might not be available.

    opened by j-oliver 1
  • new subscription workflow

    new subscription workflow

    Add

    • new subscription workflow
    • useMultiConnectionState
    • new state management for ux4iot base
    • aligned callback methods (breaking)
    • rework codebase

    Don't merge until integration tests pass

    opened by j-oliver 0
  • Fix multiple reinitialization

    Fix multiple reinitialization

    Bug description

    Whenever a component rerendered, that was rendering a Ux4iotContextProvider, the socket was not destroyed. Afterwards, multiple active sockets were still subscribed to data, which was not consumed. This was because

    • the initialization of the Ux4iot Socket is asynchronous which caused race conditions
    • multiple side-by-side initializations were allowed
    • the sockets weren't disconnected whenever the Ux4iotContextProvider unmounted

    Solution

    • A ref in the Ux4iotContextProvider, checking whether the ux4iot is currently initialized
    • A dedicated useEffect to call the destroy function on a potentially active ux4iot instance
    • Additional checks for client or server disconnects within the Ux4iot class

    Notes

    Some console.logs were deleted and the Testing App now has more options to simulate real app situations like unmounts, multiple reloads, etc.

    opened by j-oliver 0
Owner
Device Insight
Device Insight
⚡️ Lightning-fast search for React and React Native applications, by Algolia.

React InstantSearch is a library for building blazing fast search-as-you-type search UIs with Algolia. React InstantSearch is a React library that let

Algolia 2k Dec 27, 2022
Centrally manage state for React applications with CSP

State Trooper Install npm npm install state-trooper Yarn yarn add state-trooper Example Usage Call StateTrooper.patrolRunLoop in your route handler/ma

Swipely 15 May 14, 2022
React, React Native and Vue UI components for building data-driven apps with Elasticsearch

Reactive Search UI components library for Elasticsearch: Available for React, Vue and React Native Read how to build an e-commerce search UI a.) with

appbase.io 4.7k Jan 4, 2023
A React framework for building text editors.

Draft.js Draft.js is a JavaScript rich text editor framework, built for React and backed by an immutable model. Extensible and Customizable: We provid

Facebook 22.3k Dec 31, 2022
Demo app for refine.dev integration, a react-based framework for rapid building of internal tools.

Demo app for refine.dev integration, a react-based framework for rapid building of internal tools.

Permify 7 Apr 28, 2022
A completely customizable framework for building rich text editors. (Currently in beta.)

A completely customizable framework for building rich text editors. Why? · Principles · Demo · Examples · Documentation · Contributing! Slate lets you

Ian Storm Taylor 26.2k Jan 9, 2023
react-pdf-highlighter is a React library that provides annotation experience for PDF documents on web.

☕️ Buy me a coffee react-pdf-highlighter react-pdf-highlighter is a React library that provides annotation experience for PDF documents on web. It is

Vladyslav 9 Dec 2, 2022
A tiny, blazing fast view library that creates reactive Web Components

dlite A tiny, blazing fast view library that creates reactive Web Components ?? Complete documentation https://dlitejs.com ?? Introduction dlite creat

Adam Hill 20 Feb 25, 2023
The next open source file uploader for web browsers :dog:

Uppy Tests Deploys Uppy is a sleek, modular JavaScript file uploader that integrates seamlessly with any application. It’s fast, easy to use and lets

Transloadit 26.2k Jan 6, 2023
Lightweight react-like library. Support for asynchronous rendering and hooks.

Recept · Lightweight react-like library. Like the name, this project is mainly based on the architectural idea of react, which can feel react more int

RuiLin Dong 52 Sep 17, 2022