Skip to main content

useCheckUsernameAvailability

Overview

The useCheckUsernameAvailability hook is used to check if a specified username is available for use. This is helpful during user registration or profile updates to ensure the uniqueness of usernames.

Usage Example

Parameters & Returns

Parameters

The hook returns a function that accepts an object with the following field:
username
string
required
The username to check for availability.

Returns

The function resolves with a boolean value:
response.available
boolean
true if the username is available, otherwise false.