Functions
Function: useOrders
module react autonomy docid\ zoz6w56ubppacr0po0gls useorders ▸ useorders ( options? ) interface useorders docid 1y5mg 25noqy5qvungpp3 the useorders hook returns an object representing the current user's orders this hook has a side effect that will load all the user's orders upon calling it, if not already loaded optionally, an object can be passed to the hook to expand the orders object to include additional properties this looks like useorders({ includedetails true }) this includedetails option only applies to the initial load of the orders import { useorders } from '@chordcommerce/react autonomy' const orderspage = () => { const { orders, isloaded, isfetching, error } = useorders() if (isfetching) { return \<p>loading…\</p> } return ( \<dl> {orders map(order => ( \<react fragment key={order number}> \<dt>order #{order number}\</dt> \<dd> total price {order displaytotal} \<br /> (items {order lineitems map(li => li sku) join(', ')}) \</dd> \</react fragment> )} \</dl> ) } parameters name type options? object options includedetails? boolean returns interface useorders docid 1y5mg 25noqy5qvungpp3 defined in packages/react autonomy/src/hooks/use orders ts 53 https //github com/chordcommerce/chord ui/blob/2b105e1/packages/react autonomy/src/hooks/use orders ts#l53