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

Function getUniqueIdForDatabaseQuery

src/database.tsx:13–19  ·  view source on GitHub ↗
(query: DatabaseQuery)

Source from the content-addressed store, hash-verified

11}
12
13function getUniqueIdForDatabaseQuery(query: DatabaseQuery) {
14 const index = cachedQueries.findIndex((cachedQuery) => cachedQuery.isEqual(query));
15 if (index > -1) {
16 return index;
17 }
18 return cachedQueries.push(query) - 1;
19}
20
21/**
22 * Subscribe to a Realtime Database object

Callers 2

useDatabaseListFunction · 0.85
useDatabaseListDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected