Created
November 2, 2021 14:37
-
-
Save jenschr/38dd531c3c64edb04cb52ea1fd847c82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { useMqttState } from 'mqtt-react-hooks'; | |
export default function Status() { | |
/* | |
* Status list | |
* - Offline | |
* - Connected | |
* - Reconnecting | |
* - Closed | |
* - Error: printed in console too | |
*/ | |
const { connectionStatus } = useMqttState(); | |
return <h1>{`Status: ${connectionStatus}`}</h1>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment