Sanity App SDK
    Preparing search index...

    Interface DocumentsResponse<TDocumentType, TDataset, TProjectId>

    Return value from the useDocuments hook

    interface DocumentsResponse<
        TDocumentType extends string = string,
        TDataset extends string = string,
        TProjectId extends string = string,
    > {
        count: number;
        data: DocumentHandle<TDocumentType, TDataset, TProjectId>[];
        hasMore: boolean;
        isPending: boolean;
        loadMore: () => void;
    }

    Type Parameters

    • TDocumentType extends string = string
    • TDataset extends string = string
    • TProjectId extends string = string
    Index

    Properties

    count: number

    Total count of items matching the query

    Array of document handles for the current batch

    hasMore: boolean

    Whether there are more items available to load

    isPending: boolean

    Whether a query is currently in progress

    loadMore: () => void

    Function to load the next batch of results