AsyncStorage.setItem(ACCESS_TOKEN, JSON.stringify(responseData), (err)=> {
if(err){
console.log("an error");
throw err;
}
console.log("success");
}).catch((err)=> {
console.log("error is: " + err);
});
try {
const value = await AsyncStorage.getItem(ACCESS_TOKEN);
if (value !== null) {
// We have data!!
console.log(JSON.parse(value));
}
} catch (error) {
// Error retrieving data
}