Answers for "Switch React Native Paper"

0

Switch React Native Paper

import { Switch } from 'react-native-paper';

const MyComponent = () => {
  const [isSwitchOn, setIsSwitchOn] = React.useState(false);

  const onToggleSwitch = () => setIsSwitchOn(!isSwitchOn);

  return <Switch value={isSwitchOn} onValueChange={onToggleSwitch} />;
};
Posted by: Guest on May-21-2021

Code answers related to "Switch React Native Paper"

Code answers related to "Javascript"

Browse Popular Code Answers by Language