Function useObject

  • Returns the DataSnapshot of the Realtime Database query

    Parameters

    • query: undefined | null | Query

      Realtime Database query

    Returns UseObjectResult

    User, loading state, and error

    • value: DataSnapshot; 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