@hydevs/hypb
Version:
<img src="https://github.com/Hydevs-Corp/Hypb/blob/9308ab4c17196e5c0083c983a528326fd2cba867/.github/assets/banner.png" alt="usehooks-ts banner" align="center" />
14 lines (13 loc) • 506 B
TypeScript
import { RecordOptions } from 'pocketbase';
import { Collections } from '../types';
export declare function useRecord<T extends keyof Collections>(collection: T, recordId: string | undefined, params?: {
defaultValue?: undefined | Collections[typeof collection];
queryParams?: RecordOptions;
onNotFound?: () => Promise<boolean | undefined>;
realtime?: boolean;
}): {
record: Collections[T] | undefined;
invalidate: () => Promise<void>;
loading: boolean;
deleted: boolean;
};