react-firehooks
Version:
Lightweight dependency-free collection of React hooks for Firebase
17 lines (16 loc) • 506 B
TypeScript
export declare const LoadingState: unique symbol;
/**
* @internal
*/
export interface UseLoadingValueResult<Value, Error> {
value: Value | undefined;
setValue: (value?: Value | undefined) => void;
loading: boolean;
setLoading: () => void;
error?: Error | undefined;
setError: (error: Error) => void;
}
/**
* @internal
*/
export declare function useLoadingValue<Value, Error = unknown>(initialState: Value | undefined | typeof LoadingState): UseLoadingValueResult<Value, Error>;