Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function useFirestoreDoc(
ref: firestore.DocumentReference,
options?: ReactFireOptions
): T extends {} ? T : firestore.DocumentSnapshot {
return useObservable(
doc(ref),
'firestore doc: ' + ref.path,
options ? options.startWithValue : undefined
);
}
switchMap((user: firebase.User) =>
doc(firestore.collection('configs').doc(user.uid))
),
return preloadFirestore(firebaseApp).then(firestore => {
const ref = refProvider(firestore() as firebase.firestore.Firestore);
return preloadObservable(doc(ref), ref.path);
});
}