Skip to main content

Appmaker Hooks

Appmaker built-in hooks.

useCartProduct​

This hook is used to get the cart product data.

useCart​

This hook is used to get the cart data.

useProductDetail​

This hook is used to get the product detail data.

useProductListItem​

This hook is used to get the product list item data.

useProductVariations​

This hook is used to get the product variations in product list.

useProductOptions​

This hook is used to get the product variations in productDetail page.

useDiscount​

This hook is used to get the discount data.

useOtpLogin​

This hook is used to implement OTP login in your app.

useUserProfile​

This hook is used to get the user profile data.

useUser​

This hook is used to get the user data.

useCurrentUser​

This hook is used to fetch the profile information of the currently authenticated user, including metafields.

useReviewSummary​

This hook is used to get the review summary data.

useReviewListItem​

This hook is used to retrieve the data for a review item and is used in the review list item component.

useAddReview​

This hook is used to add a review.

useOrderLineItem​

This hook is used to get the order line item data.

useProductImages​

This hook is used to get the product images and handle the image swiper actions. Used in the product detail page.

useWishlistProductIds​

This hook is used to get the wishlist product ids.

useWishlistProducts​

This hook is used to get the wishlist products.

useAddress​

This hook is used to get the address data.

useAddressItem​

This hook is used to get the address item data.

useAddAddress​

This hook is used to add an address.

useProductWishList​

This hook is used to add or remove products from wishlist.

useRegister​

This hook is used to get handle register functionality.

useLogin​

This hook is used to get handle login functionality.

useForgotPassword​

This hook allows you to send a reset password email to a customer.

useNavigationActions​

This hook allows you to get the navigation actions.

usePage​

This hook is used to get the page data.

useCartActions​

This hook is used to add multiple items to the cart.

useOrders​

This hook is used to get the order data of the user.

useProducts​

This hook is used to get the products data by passing the query params.

useShopifyProduct​

This hook is used to get the product data in a specific format by passing the product node.

useLocalCart​

This hook is used to get the local cart data. You can use this hook to get cart data outside the cart page.

useProductCartQuantity​

This hook is used to get the product cart quantity data.

useScrollToBlock​

This hook is used to scroll to a specific block on the page.

useReviewsList​

This hook is used to get list of reviews

useQuickFilters​

This hook is used to get the quick filters data for a collection. It fetches the filters based on the collection ID and returns the available filters.

useCurrentCart​

This hook returns the current Shopify cart object from the app's persisted storage.

useUserProfileV2​

This hook provides user profile management with form validation using react-hook-form and Zod schema.

useEmailOtpLogin​

This hook manages email-based OTP login flow, including sending, verifying, and resending OTP codes.

useProductDetailV2​

This hook provides product detail page functionality including add-to-cart, buy now, pricing, and selling plan support.

useLineItemAttributes​

This hook manages custom line item attributes (cart item properties) on the product detail page.

useProductQuantity​

This hook manages the product quantity on the product detail page with min/max constraints.

useFilterOptions​

This hook provides access to the filter selection state and actions for the product list filter UI.

useSortModal​

This hook manages the visibility state of the sort modal on product list pages.

useProductFilterActions​

This hook provides actions to programmatically manage product filters from outside the filter modal.

useProductFilters​

This hook fetches available product filters from Shopify for a given collection or search query.

useSearch​

This hook manages the search query state and provides the search result count.

useSearchSuggest​

This hook provides access to search suggestion terms from the block data.

useSearchQuery​

This hook manages the search input value in page state.

useSearchResult​

This hook retrieves the predictive search results stored in page state.

useRecentSearch​

This hook manages the user's recent search history stored in AsyncStorage.

usePredictiveSearch​

This hook provides real-time predictive search results from Shopify's predictive search API with debouncing.

useOrderItem​

This hook extracts and formats order data from block attributes for rendering order items in the order list.

usePageState​

This hook provides access to the Zustand-based page-level state for reading block data, current action, and custom state.

useDataSourceV2​

This hook provides React Query-based data fetching for single-page and paginated data sources.

useThemeSettings​

This hook returns the current theme settings object from the plugin store.

useReusableBlocks​

This hook provides access to the persisted reusable blocks store for managing shared block templates.

useScrollValueY​

This hook returns a shared animated scroll Y value for coordinating scroll-based animations across components.