MCPcopy Index your code
hub / github.com/FirebaseExtended/reactfire / useFirestoreDoc

Function useFirestoreDoc

src/firestore.tsx:42–47  ·  view source on GitHub ↗
(ref: DocumentReference<T>, options?: ReactFireOptions<T>)

Source from the content-addressed store, hash-verified

40 * You can preload data for this hook by calling `preloadFirestoreDoc`
41 */
42export function useFirestoreDoc<T = DocumentData>(ref: DocumentReference<T>, options?: ReactFireOptions<T>): ObservableStatus<DocumentSnapshot<T>> {
43 const observableId = getDocObservableId(ref);
44 const observable$ = doc(ref);
45
46 return useObservable(observableId, observable$, options);
47}
48
49/**
50 * Get a firestore document and don't subscribe to changes

Callers 1

firestore.test.tsxFile · 0.85

Calls 2

getDocObservableIdFunction · 0.85
useObservableFunction · 0.85

Tested by

no test coverage detected