Skip to main content

Overview

useCheckUsernameAvailability returns a function that checks whether a given username is available in the project. Use this to validate a username in real time before calling updateUser.

Usage Example

Parameters

The hook returns a function. That function accepts:
username
string
required
The username to check.

Returns

available
boolean
true if the username is available, false if it is already taken.