async function get_user_name() {
try {
let user_data = await AsyncStorage.getItem('user_data') || 'none';
let parse = JSON.parse(user_data);
return parse.user_id;
} catch (error) {
// Error retrieving data
console.log(error.message);
}
}
alert(get_user_name()); //Выдает Object object
get_user_name().then(alert);
(async () => {
alert(await get_user_name());
})();