Skip to main content

useChangeEmail()

Overload 1 of 2

Use the hook useChangeEmail to change email for the user.

const { changeEmail, isLoading, needsEmailVerification, isError, error } =
useChangeEmail()

console.log({ isLoading, needsEmailVerification, isError, error })

const handleFormSubmit = async (e) => {
e.preventDefault()

await changeEmail({
email: 'new@example.com'
})
}

Parameters


options optional ChangeEmailOptions


Overload 2 of 2

Deprecated

This overload is deprecated.

Parameters


email optional string


options optional ChangeEmailOptions