Skip to Content
shopify.dev
  • Apps
  • Themes
  • Custom storefronts
  • Marketplaces
    • Apps

      • GraphQL Admin API
      • REST Admin API
    • Themes

      • Liquid
      • Ajax API
    • Custom storefronts

      • Storefront API
      • Hydrogen
      • View all
Press Up Down to navigate, enter to select, esc to dismiss
No search results
  • Log in
  • Sign up
shopify.dev
  • Apps
  • Themes
  • Custom storefronts
  • Marketplaces
  • APIs and references
      • GraphQL Admin API
      • REST Admin API
      • Liquid
      • Ajax API
      • Storefront API
      • Hydrogen
      • View all
  • APIs and references
    • Overview
    • Developer previews
    • 2022-07 (Release candidate)
    • 2022-04
    • 2022-01
    • 2021-10
    • 2021-07
    • 2021-04
    • Overview
    • Authentication
    • Access scopes
      • Overview
      • Getting updates
      • API health report
    • Rate limits
    • Search syntax
    • Response status codes
    • Idempotent requests
      • Exports and queries
      • Imports and mutations
      • GraphQL
      • REST
    • Overview
      • Customer data
        • Overview
        • Querying customer segments
          • Overview
          • Compatibility and behavior
          • Apply discounts to customer saved searches
      • Discounts
      • Gift cards
        • App translations
        • Country fields
        • Online store translations
        • Shop locales
        • Events and engagements
        • SEO data
        • Order editing
        • Sales data
        • Test orders
        • Inventory
        • Media
        • Product cost
        • Status
        • Variant media
        • Delivery profiles
        • Shipping duty refunds
      • Shop
      • Uninstalling apps
      • Cart
      • Checkout
      • Customers
        • International pricing
        • Multiple currencies
        • Multiple languages
        • Querying data
        • Local pickup
        • Metafields
        • Product filtering
      • Subscriptions
    • Overview
    • Getting started
    • GraphQL reference
    • REST reference
  • Partner API
    • Overview
    • Getting started
      • Overview
        • Overview
        • Mutations
        • paymentsAppConfigure
        • Overview
        • Mutations
        • captureSessionReject
        • captureSessionResolve
        • Overview
        • QueryRoot
        • ApiVersion
        • CaptureSession
        • CaptureSessionRejectionReasonInput
        • CaptureSessionState
        • CaptureSessionStateCode
        • CaptureSessionStateRejected
        • CaptureSessionStateRejectedReason
        • CaptureSessionStateResolved
        • CaptureSessionStates
        • CaptureSessionStatus
        • CaptureSessionStatusCode
        • CaptureSessionStatusReason
        • CaptureSessionStatusReasonRejectionCode
        • PaymentsAppConfiguration
        • PaymentSession
        • PaymentSessionActionsRedirect
        • PaymentSessionNextAction
        • PaymentSessionNextActionAction
        • PaymentSessionNextActionContext
        • PaymentSessionRejectionReasonInput
        • PaymentSessionState
        • PaymentSessionStateCode
        • PaymentSessionStatePending
        • PaymentSessionStatePendingReason
        • PaymentSessionStateRejected
        • PaymentSessionStateRejectedReason
        • PaymentSessionStateResolved
        • PaymentSessionStates
        • PaymentSessionStatus
        • PaymentSessionStatusCode
        • PaymentSessionStatusReason
        • PaymentSessionStatusReasonRejectionCode
        • RefundSession
        • RefundSessionRejectionReasonInput
        • RefundSessionState
        • RefundSessionStateCode
        • RefundSessionStateRejected
        • RefundSessionStateRejectedReason
        • RefundSessionStateResolved
        • RefundSessionStates
        • RefundSessionStatus
        • RefundSessionStatusCode
        • RefundSessionStatusReason
        • RefundSessionStatusReasonRejectionCode
        • VoidSession
        • VoidSessionRejectionReasonInput
        • VoidSessionState
        • VoidSessionStateCode
        • VoidSessionStateRejected
        • VoidSessionStateRejectedReason
        • VoidSessionStateResolved
        • VoidSessionStates
        • VoidSessionStatus
        • VoidSessionStatusCode
        • VoidSessionStatusReason
        • VoidSessionStatusReasonRejectionCode
        • deprecated
        • include
        • skip
        • Overview
        • Mutations
        • paymentSessionPending
        • paymentSessionReject
        • paymentSessionResolve
        • Overview
        • Mutations
        • refundSessionReject
        • refundSessionResolve
      • Scalars
        • Overview
        • Mutations
        • voidSessionReject
        • voidSessionResolve
    • Overview
    • Reference
  • Multipass
    • Overview
    • Boolean attributes
    • Date attributes
    • Enum attributes
    • Float attributes
    • Function attributes
    • Integer attributes
    • List attributes
    • String attributes
    • Grouped clauses
    • Overview
      • Overview
      • Handles
      • Operators
      • Types
      • Truthy and falsy
      • Whitespace control
      • Overview
      • Array filters
      • Color filters
      • Font filters
      • HTML filters
      • Math filters
      • Media filters
      • Metafield filters
      • Money filters
      • String filters
      • URL filters
      • Additional filters
      • Deprecated filters
      • Overview
      • address
      • all_country_option_tags
      • app
      • article
      • block
      • blog
      • cart
      • checkout
      • collection
      • color
      • comment
      • country
      • country_option_tags
      • currency
      • current_page
      • current_tags
      • customer
      • customer_address
      • date
      • discount_allocation
      • discount_application
      • external_video
      • filter
      • filter_value
      • font
      • forloop
      • form
      • fulfillment
      • generic_file
      • gift_card
      • group
      • handle
      • image
      • line_item
      • link
      • linklist
      • localization
      • location
      • measurement
      • media
      • metafield
      • model
      • model_source
      • order
      • page
      • page_description
      • page_image
      • page_title
      • paginate
      • part
      • payment_terms
      • policy
      • predictive_search
      • product
      • product_option
      • rating
      • recommendations
      • request
      • robots
      • routes
      • rule
      • script
      • search
      • section
      • selling_plan
      • selling_plan_allocation
      • selling_plan_group
      • shipping_method
      • shop
      • shop_locale
      • sitemap
      • store_availability
      • tablerow
      • tax_line
      • template
      • transaction
      • unit_price_measurement
      • user_agent
      • variant
      • video
      • video_source
      • Deprecated objects and object properties
      • Overview
      • Control flow tags
      • Iteration tags
      • Theme tags
      • Variable tags
      • Deprecated tags
    • Overview
      • Cart
      • Product
      • Product recommendations
      • Predictive search
  • Section Rendering API
  • Customer Privacy API
  • Storefront API
    • Overview
      • Overview
        • Overview
        • Cookie
        • CookieSessionStorage
        • FileSessionStorage
        • FileRoutes
        • Link
        • MemorySessionStorage
        • Route
        • Router
        • Overview
        • ExternalVideo
        • Image
        • MediaFile
        • Metafield
        • ModelViewer
        • Money
        • Seo
        • ShopPayButton
        • Video
        • Overview
        • ShopifyProvider
        • Overview
        • ProductPrice
        • ProductProvider
        • Overview
        • AddToCartButton
        • BuyNowButton
        • CartCheckoutButton
        • CartEstimatedCost
        • CartLineImage
        • CartLinePrice
        • CartLineProductTitle
        • CartLineProvider
        • CartLineQuantity
        • CartLineQuantityAdjustButton
        • CartLines
        • CartProvider
        • CartShopPayButton
        • Overview
        • LocalizationProvider
      • Overview
        • Overview
        • useNavigate
        • useRouteParams
        • useSession
        • Overview
        • useLoadScript
        • useMoney
        • Overview
        • fetchSync
        • useQuery
        • useServerProps
        • useShop
        • useShopQuery
        • useUrl
        • Overview
        • useProduct
        • useProductOptions
        • Overview
        • useCart
        • useCartLine
        • Overview
        • useCountry
        • Overview
        • useParsedMetafields
      • Overview
      • flattenConnection
      • log
      • isClient
      • isServer
      • parseMetafieldValue
      • queryShop
    • Overview
    • Utilities
      • Overview
      • Badge
      • Banner
      • BlockStack
      • Button
      • Card
      • CardSection
      • Checkbox
      • Heading
      • Icon
      • InlineStack
      • Link
      • Modal
      • OptionList
      • Pressable
      • Radio
      • ResourceItem
      • ResourceList
      • Select
      • Spinner
      • StackItem
      • Text
      • TextBlock
      • TextField
      • Thumbnail
    • Overview
      • Overview
      • Extension points API
        • Overview
        • Banner
        • BlockStack
        • Bookend
        • Button
        • ButtonGroup
        • BuyerConsent
        • CalloutBanner
        • Checkbox
        • Form
        • FormLayout
        • Heading
        • HeadingGroup
        • HiddenForAccessibility
        • Image
        • InlineStack
        • Layout
        • Link
        • Radio
        • Select
        • Separator
        • Spinner
        • Text
        • TextBlock
        • TextContainer
        • TextField
        • Tiles
        • View
        • VisuallyHidden
      • JWT specification
    • Overview
    • Cart extension reference
    • Product recommendations reference
  • Log in
  • Sign up
Opens in a new windowOpens an external siteOpens an external site in a new window
  • APIs and references
    • Overview
    • Developer previews
    • 2022-07 (Release candidate)
    • 2022-04
    • 2022-01
    • 2021-10
    • 2021-07
    • 2021-04
    • Overview
    • Authentication
    • Access scopes
      • Overview
      • Getting updates
      • API health report
    • Rate limits
    • Search syntax
    • Response status codes
    • Idempotent requests
      • Exports and queries
      • Imports and mutations
      • GraphQL
      • REST
    • Overview
      • Customer data
        • Overview
        • Querying customer segments
          • Overview
          • Compatibility and behavior
          • Apply discounts to customer saved searches
      • Discounts
      • Gift cards
        • App translations
        • Country fields
        • Online store translations
        • Shop locales
        • Events and engagements
        • SEO data
        • Order editing
        • Sales data
        • Test orders
        • Inventory
        • Media
        • Product cost
        • Status
        • Variant media
        • Delivery profiles
        • Shipping duty refunds
      • Shop
      • Uninstalling apps
      • Cart
      • Checkout
      • Customers
        • International pricing
        • Multiple currencies
        • Multiple languages
        • Querying data
        • Local pickup
        • Metafields
        • Product filtering
      • Subscriptions
    • Overview
    • Getting started
    • GraphQL reference
    • REST reference
  • Partner API
    • Overview
    • Getting started
      • Overview
        • Overview
        • Mutations
        • paymentsAppConfigure
        • Overview
        • Mutations
        • captureSessionReject
        • captureSessionResolve
        • Overview
        • QueryRoot
        • ApiVersion
        • CaptureSession
        • CaptureSessionRejectionReasonInput
        • CaptureSessionState
        • CaptureSessionStateCode
        • CaptureSessionStateRejected
        • CaptureSessionStateRejectedReason
        • CaptureSessionStateResolved
        • CaptureSessionStates
        • CaptureSessionStatus
        • CaptureSessionStatusCode
        • CaptureSessionStatusReason
        • CaptureSessionStatusReasonRejectionCode
        • PaymentsAppConfiguration
        • PaymentSession
        • PaymentSessionActionsRedirect
        • PaymentSessionNextAction
        • PaymentSessionNextActionAction
        • PaymentSessionNextActionContext
        • PaymentSessionRejectionReasonInput
        • PaymentSessionState
        • PaymentSessionStateCode
        • PaymentSessionStatePending
        • PaymentSessionStatePendingReason
        • PaymentSessionStateRejected
        • PaymentSessionStateRejectedReason
        • PaymentSessionStateResolved
        • PaymentSessionStates
        • PaymentSessionStatus
        • PaymentSessionStatusCode
        • PaymentSessionStatusReason
        • PaymentSessionStatusReasonRejectionCode
        • RefundSession
        • RefundSessionRejectionReasonInput
        • RefundSessionState
        • RefundSessionStateCode
        • RefundSessionStateRejected
        • RefundSessionStateRejectedReason
        • RefundSessionStateResolved
        • RefundSessionStates
        • RefundSessionStatus
        • RefundSessionStatusCode
        • RefundSessionStatusReason
        • RefundSessionStatusReasonRejectionCode
        • VoidSession
        • VoidSessionRejectionReasonInput
        • VoidSessionState
        • VoidSessionStateCode
        • VoidSessionStateRejected
        • VoidSessionStateRejectedReason
        • VoidSessionStateResolved
        • VoidSessionStates
        • VoidSessionStatus
        • VoidSessionStatusCode
        • VoidSessionStatusReason
        • VoidSessionStatusReasonRejectionCode
        • deprecated
        • include
        • skip
        • Overview
        • Mutations
        • paymentSessionPending
        • paymentSessionReject
        • paymentSessionResolve
        • Overview
        • Mutations
        • refundSessionReject
        • refundSessionResolve
      • Scalars
        • Overview
        • Mutations
        • voidSessionReject
        • voidSessionResolve
    • Overview
    • Reference
  • Multipass
    • Overview
    • Boolean attributes
    • Date attributes
    • Enum attributes
    • Float attributes
    • Function attributes
    • Integer attributes
    • List attributes
    • String attributes
    • Grouped clauses
    • Overview
      • Overview
      • Handles
      • Operators
      • Types
      • Truthy and falsy
      • Whitespace control
      • Overview
      • Array filters
      • Color filters
      • Font filters
      • HTML filters
      • Math filters
      • Media filters
      • Metafield filters
      • Money filters
      • String filters
      • URL filters
      • Additional filters
      • Deprecated filters
      • Overview
      • address
      • all_country_option_tags
      • app
      • article
      • block
      • blog
      • cart
      • checkout
      • collection
      • color
      • comment
      • country
      • country_option_tags
      • currency
      • current_page
      • current_tags
      • customer
      • customer_address
      • date
      • discount_allocation
      • discount_application
      • external_video
      • filter
      • filter_value
      • font
      • forloop
      • form
      • fulfillment
      • generic_file
      • gift_card
      • group
      • handle
      • image
      • line_item
      • link
      • linklist
      • localization
      • location
      • measurement
      • media
      • metafield
      • model
      • model_source
      • order
      • page
      • page_description
      • page_image
      • page_title
      • paginate
      • part
      • payment_terms
      • policy
      • predictive_search
      • product
      • product_option
      • rating
      • recommendations
      • request
      • robots
      • routes
      • rule
      • script
      • search
      • section
      • selling_plan
      • selling_plan_allocation
      • selling_plan_group
      • shipping_method
      • shop
      • shop_locale
      • sitemap
      • store_availability
      • tablerow
      • tax_line
      • template
      • transaction
      • unit_price_measurement
      • user_agent
      • variant
      • video
      • video_source
      • Deprecated objects and object properties
      • Overview
      • Control flow tags
      • Iteration tags
      • Theme tags
      • Variable tags
      • Deprecated tags
    • Overview
      • Cart
      • Product
      • Product recommendations
      • Predictive search
  • Section Rendering API
  • Customer Privacy API
  • Storefront API
    • Overview
      • Overview
        • Overview
        • Cookie
        • CookieSessionStorage
        • FileSessionStorage
        • FileRoutes
        • Link
        • MemorySessionStorage
        • Route
        • Router
        • Overview
        • ExternalVideo
        • Image
        • MediaFile
        • Metafield
        • ModelViewer
        • Money
        • Seo
        • ShopPayButton
        • Video
        • Overview
        • ShopifyProvider
        • Overview
        • ProductPrice
        • ProductProvider
        • Overview
        • AddToCartButton
        • BuyNowButton
        • CartCheckoutButton
        • CartEstimatedCost
        • CartLineImage
        • CartLinePrice
        • CartLineProductTitle
        • CartLineProvider
        • CartLineQuantity
        • CartLineQuantityAdjustButton
        • CartLines
        • CartProvider
        • CartShopPayButton
        • Overview
        • LocalizationProvider
      • Overview
        • Overview
        • useNavigate
        • useRouteParams
        • useSession
        • Overview
        • useLoadScript
        • useMoney
        • Overview
        • fetchSync
        • useQuery
        • useServerProps
        • useShop
        • useShopQuery
        • useUrl
        • Overview
        • useProduct
        • useProductOptions
        • Overview
        • useCart
        • useCartLine
        • Overview
        • useCountry
        • Overview
        • useParsedMetafields
      • Overview
      • flattenConnection
      • log
      • isClient
      • isServer
      • parseMetafieldValue
      • queryShop
    • Overview
    • Utilities
      • Overview
      • Badge
      • Banner
      • BlockStack
      • Button
      • Card
      • CardSection
      • Checkbox
      • Heading
      • Icon
      • InlineStack
      • Link
      • Modal
      • OptionList
      • Pressable
      • Radio
      • ResourceItem
      • ResourceList
      • Select
      • Spinner
      • StackItem
      • Text
      • TextBlock
      • TextField
      • Thumbnail
    • Overview
      • Overview
      • Extension points API
        • Overview
        • Banner
        • BlockStack
        • Bookend
        • Button
        • ButtonGroup
        • BuyerConsent
        • CalloutBanner
        • Checkbox
        • Form
        • FormLayout
        • Heading
        • HeadingGroup
        • HiddenForAccessibility
        • Image
        • InlineStack
        • Layout
        • Link
        • Radio
        • Select
        • Separator
        • Spinner
        • Text
        • TextBlock
        • TextContainer
        • TextField
        • Tiles
        • View
        • VisuallyHidden
      • JWT specification
    • Overview
    • Cart extension reference
    • Product recommendations reference

Framework hooks

Framework hooks are hooks that are available in the Hydrogen framework.

Reference

Anchor link to section titled "Reference"

Hydrogen includes the following framework hooks:

Hook name Description
useNavigate The useNavigate hook imperatively navigates between routes.
useRouteParams The useRouteParams hook retrieves the parameters of an active route.
useSession The useSession hook reads session data in server components.

News and updates

  • Developer changelog
  • Shopify status

Blogs

  • Partner blog
  • Engineering blog
  • UX blog

Community

  • Developer forums
  • Devs Discord
  • Facebook group

Social

  • Twitch
  • YouTube
  • Twitter

Events

  • Unite
  • Meetups
  • Partner Town Hall

Legal

  • Terms of Service
  • API Terms of Service
  • Privacy policy
  • Partner program agreement
  • About Shopify
  • Shopify Plus
  • Careers
  • Investors
  • Press and Media