Skip to content

Instantly share code, notes, and snippets.

@akshay-nm
Created May 1, 2021 09:51
Show Gist options
  • Save akshay-nm/09f0c554cda4ba82dd97d12a21c875c1 to your computer and use it in GitHub Desktop.
Save akshay-nm/09f0c554cda4ba82dd97d12a21c875c1 to your computer and use it in GitHub Desktop.
Object returned by use-form-state
{
// form states and functions
isValid, // the overall form validity
isValidating, // are any validations still running
triggerValidation, // trigger validations
reset, // reset the form back to default configuration
// field wise states and functions
// for email
email,
onEmailChange,
isEmailValid,
showEmailWarning,
// for password
password,
onPasswordChange,
isPasswordValid,
showPasswordWarning,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment