The methods connect() and disconnect(), and the state variable connected have been exposed to the user of the library with the help of React's forwardRef and userImperativeHandle functions.
To demonstrate the usage of this, a button Connect / Disconnect was added to the demo application in App.tsx.
The methods
connect()
anddisconnect()
, and the state variableconnected
have been exposed to the user of the library with the help of React'sforwardRef
anduserImperativeHandle
functions.To demonstrate the usage of this, a button
Connect / Disconnect
was added to the demo application inApp.tsx
.closes #18