import { useProducts } from '@shopjs/react';
const MyProducts = () => {
const [page, setPage] = useState(0);
const [limit, setLimit] = useState(20);
const { products, loading } = useProducts({
page : page,
limit : limit,
category : 'categoryId',
});
return products.map(product => (
<div key={ product.id }>{ product.name }</div>
));
};