import React from 'react'; import { StyleSheet, View } from 'react-native'; import { useState } from "react"; import { Switch } from 'react-native'; export default function App() { const [isEnabled, setIsEnabled] = useState(false); const toggleSwitch = () => setIsEnabled( previousState => !previousState); return ( ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, });