UNPKG

react-firehooks

Version:

Lightweight dependency-free collection of React hooks for Firebase

13 lines (12 loc) 703 B
import { AppCheck, AppCheckTokenResult } from "firebase/app-check"; import { ValueHookResult } from "../common/index.js"; export type UseAppCheckToken = ValueHookResult<AppCheckTokenResult | null, Error>; /** * Returns and updates the current App Check token * @param appCheck Firebase App Check instance * @returns App Check token, loading state, and error * - value: App Check token; `undefined` if token is currently being fetched, or an error occurred * - loading: `true` while fetching the token; `false` if the token was fetched successfully or an error occurred * - error: `undefined` if no error occurred */ export declare function useAppCheckToken(appCheck: AppCheck): UseAppCheckToken;