Single Product
TheuseProduct hook fetches a single product by its handle (the URL-friendly slug).
Usage
Hook API
Query Fields
TheGET_PRODUCT query returns detailed product data:
- Basic fields:
id,title,handle,description,descriptionHtml availableForSale,tags,productType,vendorpriceRange— min/max variant pricesimages(first: 10)— all images withurl,altText,width,heightvariants(first: 20)— all variants withid,title,price,compareAtPrice,selectedOptions,imageoptions— product options withnameandvaluesseo—{ title, description }
Fetching by ID
If you only have a product’s Shopify GID, use the service method directly:Adding to Cart
Combine withuseCart() to add a variant: