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

Function useDatabaseListData

src/database.tsx:58–66  ·  view source on GitHub ↗
(
  ref: DatabaseReference | DatabaseQuery,
  options?: ReactFireOptions<T[]>
)

Source from the content-addressed store, hash-verified

56}
57
58export function useDatabaseListData<T = { [key: string]: unknown }>(
59 ref: DatabaseReference | DatabaseQuery,
60 options?: ReactFireOptions<T[]>
61): ObservableStatus<T[] | null> {
62 const idField = options ? checkIdField(options) : 'NO_ID_FIELD';
63 const observableId = `database:listVal:${getUniqueIdForDatabaseQuery(ref)}:idField=${idField}`;
64 const observable$ = listVal<T>(ref, { keyField: idField });
65 return useObservable(observableId, observable$, options);
66}

Callers 2

AnimalsListFunction · 0.85
AnimalsListFunction · 0.85

Calls 3

checkIdFieldFunction · 0.85
useObservableFunction · 0.85

Tested by

no test coverage detected