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

Function getUniqueIdForFirestoreQuery

src/firestore.tsx:15–21  ·  view source on GitHub ↗
(query: FirestoreQuery)

Source from the content-addressed store, hash-verified

13}
14
15function getUniqueIdForFirestoreQuery(query: FirestoreQuery) {
16 const index = cachedQueries.findIndex((cachedQuery) => queryEqual(cachedQuery, query));
17 if (index > -1) {
18 return index;
19 }
20 return cachedQueries.push(query) - 1;
21}
22
23/**
24 * Preload a subscription to a Firestore document reference.

Callers 2

useFirestoreCollectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected