Skip to main content

useOrders

The useOrders hook is used to get the orders data of the user. user must be logged in to get the orders data.

ParamsDescription
isLoadingboolean value to show loading
orderListList of orders
isFetchingboolean value to show fetching
hasNextPageboolean value to check if there is next page
fetchNextPageFunction to fetch next page

Usage


import { useOrders } from '@appmaker-xyz/shopify';

const { isLoading, orderList, isFetching, hasNextPage, fetchNextPage } =
useOrders({});