AsyncStorage.getItem() returns a single value AND a promise
Since storageGet
returns a promise, you need to also use await anywhere you use it:
const value = await storageGet(key);
AsyncStorage saves data only as strings. You just need to use JSON.stringify() when saving and JSON.parse() when retrieving.
AsyncStorage.getItem('key')
.then((value) => {
const data = JSON.parse(value);
console.log('name is ', data.name);
});