Skip to main content

useSavedProducts

The useSavedProducts hook fetches the current user's saved products.

Anchor to params
params

Examples

tsx

import {useEffect} from 'react'

import {useSavedProducts, Button} from '@shopify/shop-minis-react'

export default function MyComponent() {
const {products, fetchMore} = useSavedProducts({first: 10})

useEffect(() => {
console.log(products)
}, [products])

return <Button onClick={fetchMore}>Fetch more</Button>
}

Was this page helpful?