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

Function preloadFirestoreDoc

src/firestore.tsx:28–31  ·  view source on GitHub ↗
(refProvider: () => Promise<DocumentReference>)

Source from the content-addressed store, hash-verified

26 * Use this to warm up `useFirestoreDoc` for a specific document
27 */
28export async function preloadFirestoreDoc(refProvider: () => Promise<DocumentReference>) {
29 const ref = await refProvider();
30 return preloadObservable(doc(ref), getDocObservableId(ref));
31}
32
33function getDocObservableId(ref: DocumentReference) {
34 return `firestore:doc:${ref.firestore.app.name}:${ref.path}`;

Callers

nothing calls this directly

Calls 2

preloadObservableFunction · 0.90
getDocObservableIdFunction · 0.85

Tested by

no test coverage detected