react-firebase-hooks
Version:
React Hooks for Firebase
10 lines (7 loc) • 340 B
Flow
// @flow
import type { FirebaseUser as User } from 'firebase';
import type { Auth } from 'firebase/auth';
import typeof { Error as AuthError } from 'firebase/auth';
type LoadingHook<T> = [T | void, boolean, AuthError | void];
export type AuthStateHook = LoadingHook<User>;
declare export function useAuthState(auth: Auth): AuthStateHook;