I am trying to return the value from AsyncStorage
without using the async
function and await
. When I use the below function, however, it returns undefined
. Thank you in advance!
getAllFav(){
var collect;
const value = AsyncStorage.getAllKeys().then(
(values) => {
collect=values;
return collect;
}
)
}