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 |
useProducts({categorySlug}) | Products in category |
useFeatured() | Featured products |
useLabels(locale?) | All labels |
useSearch(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() | cart, bundle-aware isEmpty, server itemCount, add/update/remove methods for items and bundles (addBundle, updateBundleQuantity, removeBundle) |
useCartCount() | Count from the shared cart query |
useCheckoutPreview() | preview(input), isPreviewing |
useCheckout() | createOrder(input), isCreating |
| Hook | Description |
|---|
useShippingMethods(opts?) | Shipping methods with resolved prices |
useShippingQuote(opts?) | Live quote for a destination address |
usePickupPoints(opts) | Pickup points for a shipping method |
usePaymentMethods(opts?) | Payment methods for the checkout |
usePersonalOffers(opts?) | Personal behavioral offers + e-mail claim |
useAnalyticsEvents() | Send custom / ecommerce analytics events |
| Hook | Description |
|---|
useOrders(opts?) | Order list |
useOrder(orderNumber) | Order detail |
useOrderAccess() | Guest order access through email verification |
useCustomer() | Customer profile |
useAddresses() | Address book |
useWishlist() | Wishlist |
useIsInWishlist(productId) | Wishlist membership |
useProductReviews(productId) | Product reviews |
useSubmitReview() | Mutation: submit review |