Arc.React
    Preparing search index...

    Function useSuspenseObservableQueryWithPaging

    • React hook for working with IObservableQueryFor within React Suspense boundaries for queries with paging. Suspends the component until the first result is received and throws errors for ErrorBoundaries.

      Type Parameters

      • TDataType

        Type of model the query is for.

      • TQuery extends IObservableQueryFor<TDataType>

        Type of observable 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 subscribe. Defaults to true. When false, the hook is a no-op and returns an empty result without suspending.

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

      Tuple of QueryResultWithState and paging/sorting controls.

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

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