@hateoas-ts/resource-react - v1.4.0
    Preparing search index...

    Type Alias UseSuspenseInfiniteCollectionResponse<T>

    The result of a useSuspenseInfiniteCollection hook.

    type UseSuspenseInfiniteCollectionResponse<T extends Entity> = {
        error: Error | null;
        hasNextPage: boolean;
        isLoadingMore: boolean;
        items: State<ExtractCollectionElement<T>>[];
        loadNextPage: () => Promise<void>;
    }

    Type Parameters

    • T extends Entity
    Index

    Properties

    error: Error | null

    Error object if loading more pages failed

    hasNextPage: boolean

    Whether there's a next page available

    isLoadingMore: boolean

    True when loading additional pages (not initial load)

    items: State<ExtractCollectionElement<T>>[]

    Array of collection item states

    loadNextPage: () => Promise<void>

    Function to load the next page of items