Skip to main content

Function: useOrder()

useOrder(params): QueryResult<"order", Order>

Get single order

Parameters

params

params.orderId: string

The id of the order.

params.query?: QueryOptions<Order> = {}

See Tanstack Query - useQuery options.

Returns

QueryResult<"order", Order>

Example

const {
order, // useQuery's `data` property
isLoading,
isError,
error,
refetch,
...moreUseQueryResults
} = useOrder();

See

API Documentation

Order interface

Defined in

hooks.tsx:389