I'm learning Firebase. In many code examples I see something like this:
const auth = getAuth();
await signInWithPopup(auth, provider);
while in firebase web codelab they call getAuth directly:
await signInWithPopup(getAuth(), provider);
same thing with getFirestore.
so which one is the correct way of doing it and if they are both the same what is the better practice?
edit: when I need to use auth object more than once will I get any performance benefits by calling getAuth once and assigning it to a variable?