Skip to content

commerce-ui hooks

The components already use these hooks. Reach for them when you build your own UI on the same data. Open a hook for its options and what it returns.

Other hooks

useAddressConfigThe resolved config.
import { useAddressConfig } from "@evolve-storefront/commerce-ui/address-form";
function useAddressConfig(): ResolvedAddressConfig

Returns ResolvedAddressConfig

useAddressFormContextReads the state seeded by AddressForm.
import { useAddressFormContext } from "@evolve-storefront/commerce-ui/address-form";
function useAddressFormContext(): AddressFormContextValue

Returns AddressFormContextValue