Arc.React
    Preparing search index...

    Function useQueryWithPaging

    • React hook for working with IQueryFor within the state management of React for queries with paging.

      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, if any

      • OptionalisEnabled: boolean

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

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

      Tuple of QueryResult and a PerformQuery delegate.