Hooks - Template

Description of the hooks contained in the module

Indicate the path of the hooks used in the module on a code block.

Example:

|-/hooks 
    |-/phoneVerification
        |- index.ts
        |- useSendVerificationCode.ts
        |- useTime.ts
        |- useVerifyCode.ts

Name of hook

Describe the hook's functionality

If the hook returns an array describe it on a table like shown below

Example: useSendVerificationCode (hook used on MFA module)

Return Array

const Name
Type
Description

sendCodeToPhone

Function

Method which receives a countryCode, phoneNumber, eventName.

It sends a verification code to the phone provided.

Endpoint: sendCodeToPhone

clearSendVerficationCode

Function

Set the sendSuccessCode to the initial state.

sendCodeIsLoading

boolean state

Indicates if the request of sending the code is pending.

sendCodeSuccess

boolean state

Indicates if the request of sending the code was successful.

Last updated

Was this helpful?