Closed ali373 closed 3 years ago
You have to assign isOn
to a state value and then modify this state value in the onToggle
const [isSelected, setSelected] = useState(false);
...
<ToggleSwitch
isOn={isSelected}
...
onToggle={isOn=> setSelected(isOn)}
/>
The switch does not toggle.