switch in react native paper code example
Example: 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} />;
};