Type alias SuspensePaginatedResult<T>Experimental

SuspensePaginatedResult<T>: SuspenseResult<T> & {
    beforeCount: number;
    hasMore: boolean;
    next: (() => Promise<void>);
    prev: (() => Promise<void>);
}

A paginated read result that supports React Suspense.

This is an experimental type that can change at any time.

Type Parameters

  • T

Type declaration

  • beforeCount: number

    Deprecated

    not used with Suspense mode

  • hasMore: boolean

    Whether there are more items to fetch in the next page

  • next: (() => Promise<void>)

    Fetches the next page of items.

    Calling this function will cause the component to re-suspend, unless the call site is wrapped in startTransition.

    Returns

    A promise that resolves when the operation is complete, regardless if it had any items to fetch.

      • (): Promise<void>
      • Fetches the next page of items.

        Calling this function will cause the component to re-suspend, unless the call site is wrapped in startTransition.

        Returns Promise<void>

        A promise that resolves when the operation is complete, regardless if it had any items to fetch.

  • prev: (() => Promise<void>)

    Fetches the previous page of items.

    Calling this function will cause the component to re-suspend, unless the call site is wrapped in startTransition.

    Returns

    A promise that resolves when the operation is complete, regardless if it had any items to fetch.

      • (): Promise<void>
      • Fetches the previous page of items.

        Calling this function will cause the component to re-suspend, unless the call site is wrapped in startTransition.

        Returns Promise<void>

        A promise that resolves when the operation is complete, regardless if it had any items to fetch.