Is there a way I can use the same button to connect and disconnect?
For this, I should be able to change button properties dynamically.
Connect -> Connected -> Disconnect.
these could be the state of the button.
Is there a way I can use the same button to connect and disconnect?
For this, I should be able to change button properties dynamically.
Connect -> Connected -> Disconnect.
these could be the state of the button.
You can use partials to change the label of the button when it is pressed. The following code will display a button whose label will switch between "Connect" and "Disconnect" when pressed. Let me know if this fixes your issue.