Using the Hooks
Breakdown of hooks from the Torque React library
Last updated
Breakdown of hooks from the Torque React library
Last updated
import { useOffer } from '@torque-labs/react';
export function Offers() {
const { data: offers, isLoading, error } = useOffers({
status: "ACTIVE"
});
return (
<div>
{offers.map(offer => (
<div key={offer.id}>
<h3>{offer.metadata.title}</h3>
</div>
))}
</div>
);
}