There is way to save switch button state with asyncstorage
?My goal is that when the user clicks on the switcher, then its state will be preserved even when the user exits the application and returns back.
import { View, Text, Switch } from 'react-native';import React from 'react';import styles from './ViewFieldStyles';type Props = { title: string; value: boolean; setValue: () => void;};const ViewField = ({ title, value, setValue }: Props) => { return (<View style={styles.optionView}><View style={styles.sameRowTextView}><Text style={styles.optionText}>{title}</Text><View style={styles.switchView}><Switch trackColor={{ false: '#767577', true: 'rgba(4, 76, 163, 0.38)' }} thumbColor={value ? '#1d16db' : '#f4f3f4'} ios_backgroundColor='#3e3e3e' onValueChange={setValue} value={value} /></View></View></View> );};export default ViewField;