How to use the rxfire/firestore.fromCollectionRef 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 useFirestoreCollection(
  query: firestore.Query,
  options?: ReactFireOptions
): T extends {} ? T[] : firestore.QuerySnapshot {
  const queryId = getHashFromFirestoreQuery(query);

  return useObservable(
    fromCollectionRef(query, checkIdField(options)),
    queryId,
    options ? options.startWithValue : undefined
  );
}