Why do I have to wrap await with () in order to get the output I need. I am hoping to get only the uid from the object
The data that is return from the function that I am importing is exactly how you see it
{uid : 'abcdefg', email:'youremail@gmail.com'}
import {ActiveUser} from './teamMembers.service';
export const retrieveList = async date => {
console.log('active user information here', (await ActiveUser()).uid);
// outputs: Works as expected
// active user information here abcdefg
console.log('active user information here', await ActiveUser().uid);
// outputs:
//Undefined
console.log('active user information here', typeof (await ActiveUser()));
// outputs:
// object
}