Function useQueriesDataOnce

  • Returns the data of multiple Firestore queries. Does not update the data once initially fetched

    Type Parameters

    • AppModelTypes extends readonly unknown[] = readonly DocumentData[]

      Tuple of shapes of the data after it was converted from firestore

    • DbModelTypes extends readonly DocumentData[] = readonly DocumentData[]

      Tuple of shapes of the data in firestore

    Parameters

    Returns UseQueriesDataOnceResult<AppModelTypes>

    Array with tuple for each query:

    • value: Query data; undefined if query is currently being fetched, or an error occurred
    • loading: true while fetching the query; false if the query was fetched successfully or an error occurred
    • error: undefined if no error occurred