useCustomerCreate

A customer hook that helps you easily create or signup a new customer.

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

// instantiation
const { customerCreate, ...createStatus } = useCustomerCreate();

// use
const createdCustomer = await customerCreate({
  firstName,
  lastName,
  email,
  password,
  acceptsMarketing
});

firstName

the customers first name

lastName

the customer last name

email

the customer email address

password

the customer chosen password

acceptsMarketing

true || false

Last updated