Im struggling with this library. Ive set the item in shoppingCart
to an empty array. Getting the item should return []
. It doesnt, its like the promise never awaits and resolves. and yes its inside an async function.
const key = "shoppingCart"
const results = await AsyncStorage.getItem(key);
console.log(results);
returns {"_h": 0, "_i": 0, "_j": null, "_k": null}
every time. I have even tried using the callback version.
AsyncStorage.getItem(key, (err, results)=>{
console.log(results)
})
and it STILL returns {"_h": 0, "_i": 0, "_j": null, "_k": null}