import AsyncStorage from '@react-native-async-storage/async-storage'; export default { getItem: async (key: string, defaultValue: T | null) => { const value = await AsyncStorage.getItem(key); if (!value) { return defaultValue; } return JSON.parse(value) as T; }, removeItem: async (key: string) => { await AsyncStorage.removeItem(key); }, setItem: async (key: string, value: T) => { await AsyncStorage.setItem(key, JSON.stringify(value)); }, };