mqtt-react-hooks
mqtt-react-hooks copied to clipboard
Optional connection
I would like to control the connection using a state value. Can you please add a Boolean property "connect" to the Connector which will indicate if to perform a connection or not. This will support: ` const [connect, setConnet) = useState(false);
return ( <Connector connect={connect} {children components here that will optionally require mqtt} </Connector ) `