Skip to content

useProductWishlist

useProductWishlist

Category:
Product

Manage wishlist for a single product.

Types

ts
export function useProductWishlist(
  productId: string,
): UseProductWishlistReturn

source code

ts
export type UseProductWishlistReturn = {
  /**
   * Removes product from wishlist
   */
  removeFromWishlist(): Promise<void>;
  /**
   * Adds product to wishlist
   */
  addToWishlist(): Promise<void>;
  /**
   * Indicates whether a product is in wishlist
   */
  isInWishlist: Ref<boolean>;
};

source code