useOrders
The useOrders
hook is used to get the orders data of the user. user must be logged in to get the orders data.
Params | Description |
---|---|
isLoading | boolean value to show loading |
orderList | List of orders |
isFetching | boolean value to show fetching |
hasNextPage | boolean value to check if there is next page |
fetchNextPage | Function to fetch next page |
Usage
import { useOrders } from '@appmaker-xyz/shopify';
const { isLoading, orderList, isFetching, hasNextPage, fetchNextPage } =
useOrders({});