I have a deconstructured array of values, as instructed in the docs. (react-firebase-hooks)
const [ signInWithEmailAndPassword, loading, error] = useSignInWithEmailAndPassword(auth);
All is fine, but what if I have another hook with the same return keys:
const [ signInWithEmailAndPassword, loading, error] = useSignInWithEmailAndPassword(auth);
const [ signInWithGoogle, loading, error ] = useSignInWithGoogle(auth);
As I cannot redeclare variables, how would I solve this?
I want to eventually return a spinner, if either loading value is true.
What I tried: Assigning a new variable name inside the deconstructor.
What I was expecting: My expectations were open.
[ signInWithGoogle, loading: googleLoading, error: googleError ]? Left side of colon is the original variable name, right side is the name you want to rename it to.