Skip to main content

useProduct

The useProduct hook fetches a single product by its ID. Returns complete product details including variants, media, pricing, and shop information. Use this for product detail pages or when you need full product data for a single item. For fetching multiple products efficiently, use useProducts() instead which batches requests.

Anchor to params
params
required

UseProductReturns

error
Error | null
loading
boolean
product
| null

The product returned from the query.

refetch
() => Promise<void>
Examples
import {useProduct} from '@shopify/shop-minis-react'

export default function MyComponent() {
const {product, loading, error} = useProduct({
id: 'gid://shopify/Product/123',
})

console.log({product, loading, error})
}
Was this page helpful?