React Hooks
Hooks Overview
All available React hooks at a glance
All hooks require the BehioProvider wrapper. See Installation.
| Hook | Description |
|---|
useProducts(query?) | Product list with filters |
useProduct(slug) | Single product detail |
useCategories(locale?) | Category tree |
useCategoryProducts(slug, query?) | Products in category |
useFeaturedProducts() | Featured products |
useLabels(locale?) | All labels |
useProductSearch(query, opts?) | Search products |
| Hook | Description |
|---|
useBundles() | List bundles |
useBundle(slug) | Bundle detail |
useCrossSell(slug) | Cross-sell for product |
useProductPromotions(slug) | Active promotions |
useGiftCardBalance(code) | Gift card balance check |
| Hook | Description |
|---|
useCart() | Current cart state |
useAddToCart() | Mutation: add item |
useUpdateCartItem() | Mutation: update quantity |
useRemoveCartItem() | Mutation: remove item |
useCheckout() | Mutation: create order |
| Hook | Description |
|---|
useOrders(opts?) | Order list |
useOrder(orderNumber) | Order detail |
useOrderTracking(token) | Track by token |
useCustomerProfile() | Customer profile |
useCustomerAddresses() | Address book |
useWishlist() | Wishlist |
useAddToWishlist() | Mutation: add to wishlist |
useRemoveFromWishlist() | Mutation: remove from wishlist |
useProductReviews(productId) | Product reviews |
useSubmitReview() | Mutation: submit review |