How to use the rxfire/firestore.doc function in rxfire

To help you get started, we’ve selected a few rxfire examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FirebaseExtended / reactfire / reactfire / firestore / index.tsx View on Github external
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
  );
}
github CreativeBuilds / creative-bot / src / renderer / helpers / rxConfig.ts View on Github external
switchMap((user: firebase.User) =>
    doc(firestore.collection('configs').doc(user.uid))
  ),
github FirebaseExtended / reactfire / reactfire / firestore / index.tsx View on Github external
return preloadFirestore(firebaseApp).then(firestore => {
    const ref = refProvider(firestore() as firebase.firestore.Firestore);
    return preloadObservable(doc(ref), ref.path);
  });
}