Current implementation changes state of Switch Button in css styles.
This makes impossible to change its state programmatically. It could be nice if this Component could use isChecked-prop so its state would not change every time it's toggled.
My problem came up when I made "are u sure" confirm before making API call, and if user cancels then SwitchButton's state changes anyways because its state can not be controlled programmatically.
Current implementation changes state of Switch Button in css styles.
This makes impossible to change its state programmatically. It could be nice if this Component could use isChecked-prop so its state would not change every time it's toggled.
My problem came up when I made "are u sure" confirm before making API call, and if user cancels then SwitchButton's state changes anyways because its state can not be controlled programmatically.