Behio Storefront SDK
React Hooks

Hooks Overview

All available React hooks at a glance

All hooks require the BehioProvider wrapper. See Installation.

Available Hooks

Catalog

HookDescription
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

Bundles & Promotions

HookDescription
useBundles()List bundles
useBundle(slug)Bundle detail
useCrossSell(slug)Cross-sell for product
useProductPromotions(slug)Active promotions
useGiftCardBalance(code)Gift card balance check

Cart

HookDescription
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

Shipping, Payment & Offers

HookDescription
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

Customer

HookDescription
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

On this page