React library for ux4iot for easily building IoT web applications
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 devicesuseSingleTelemetry
– Subscribe to a single telemetry key of a deviceuseDeviceTwin
– Subscribe to device twin changes of a deviceuseConnectionState
– Subscribe to connection state updates of a deviceuseDirectMethod
– Execute a direct method on a deviceusePatchDesiredProperties
– Update the desired properties of a deviceuseD2CMessage
– 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