useCustomerCreateAddress

A customer hook that helps you easily create a customer address.

// import
import { useCustomerCreateAddress } from '@backpackjs/storefront';

// instantiation
const { createAddress, ...createStatus } = useCustomerCreateAddress();

// use
const createdAddress = await createAddress({ address, isDefault })

id

the id of the address being updated

isDefault

true || false sets or unsets new address as default

address

the new address data { firstName: '..', lastName, address1, address2, city, province, country, "zip", "phone" }

Last updated