I'm trying to save my data locally with AsyncStorage but there seems to be an issue when I use getData
const storeData = async (value: string) => { //storing data to local storage of the device try { await AsyncStorage.setItem("@storage_Key", value); } catch (e) {}};const getData = async () => { try { const value = await AsyncStorage.getItem("@storage_Key"); if (value !== null) { // value previously stored } } catch (e) {}};...<View><TextInput editable value={value} /> {storeData(value)} {getData()}</View>
I thought I would have my value back but I got a blank page. Any idea of how to use AsyncStorage ? I used https://react-native-async-storage.github.io/async-storage/docs/usage/ .