import {Alert} from 'react-native'; import AsyncStorage from '@react-native-async-storage/async-storage'; const KEY = '@SKIP_APP_INTRODUCTION'; export const skipAppIntroduction = async (): Promise => { try { const value = await AsyncStorage.getItem(KEY); return value === 'YES' ? true : false; } catch (e: any) { Alert.alert(e); return false; } }; export const setAppIntroductionDone = async () => { try { await AsyncStorage.setItem(KEY, 'YES'); } catch (e: any) { Alert.alert(e); } };