I want to store data via asyncstorage in my react-native app, But I have a problem. I using it like that:
async componentDidMount() {
console.log("Flag1");
await AsyncStorage.setItem('name', 'I like to save it.');
console.log("Flag2");
}
But for some reason I cant reach "Flag2", And I am not getting an error or a data from the await call. I also tried use try/catch, facing the same problem.
edit I noticed that AsyncStorage works for me only when I just open the emulator, after a couple of uses it stops working.