Arc.React
    Preparing search index...

    Function useSuspenseQueryWithPaging

    • React hook for working with IQueryFor within React Suspense boundaries for queries with paging. Suspends the component while the query is loading and throws errors for ErrorBoundaries.

      Type Parameters

      • TDataType

        Type of model the query is for.

      • TQuery extends IQueryFor<TDataType>

        Type of query to use.

      • TArguments = object

        Optional: Arguments for the query, if any

      Parameters

      • query: Constructor<TQuery>

        Query type constructor.

      • paging: Paging

        Paging information.

      • Optionalargs: TArguments

        Optional: Arguments for the query, if any

      • Optionalsorting: any

        Optional: Sorting for the query.

      • isEnabled: boolean = true

        Optional: Whether the query should be executed. Defaults to true. When false, the hook is a no-op and returns an empty result without suspending.

      Returns [
          QueryResultWithState<TDataType>,
          PerformQuery<TArguments>,
          SetSorting,
          SetPage,
          SetPageSize,
      ]

      Tuple of QueryResultWithState, a PerformQuery delegate, and paging controls.

      The exception that is thrown when the query has server-side exceptions.

      The exception that is thrown when the query is not authorized.