File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,35 @@ export type CollectionHook = {
1212 loading: boolean,
1313 value?: QuerySnapshot,
1414};
15+ export type CollectionDataHook<T> = {
16+ error?: Object,
17+ loading: boolean,
18+ value?: T,
19+ };
1520export type DocumentHook = {
1621 error?: Object,
1722 loading: boolean,
1823 value?: DocumentSnapshot,
1924};
25+ export type DocumentDataHook<T> = {
26+ error?: Object,
27+ loading: boolean,
28+ value?: T,
29+ };
2030
2131declare export function useCollection(
2232 query?: Query | null,
2333 options?: SnapshotListenOptions
2434): CollectionHook;
35+ declare export function useCollectionData(
36+ query?: Query | null,
37+ idField?: string
38+ ): CollectionDataHook;
2539declare export function useDocument(
2640 ref?: DocumentReference | null,
2741 options?: SnapshotListenOptions
2842): DocumentHook;
43+ declare export function useDocumentData(
44+ ref?: DocumentReference | null,
45+ idField?: string
46+ ): DocumentHook;
You can’t perform that action at this time.
0 commit comments