Function useQueryDataOnce

  • Returns the data of a Firestore Query. Does not update the data once initially fetched

    Type Parameters

    • AppModelType = DocumentData

      Shape of the data after it was converted from firestore

    • DbModelType extends DocumentData = DocumentData

      Shape of the data in firestore

    Parameters

    Returns UseQueryDataOnceResult<AppModelType>

    Query data, loading state, and error

    • 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