useFormContext

Description

useFormContext provides a useForm hook resources, and you can use it to get; state, functions to use in another component in them same tree.

When you use this hook make sure that you have a FormContextProvider in the root of the components tree.

PropertyDescription
errorsObject with all errors, this object is the same shape of object values.
isValidBoolean property

Usage

jsx
import UserFormContext from './'
const { state, register,... } = useFormContext(UserFormContext)

If you want to know more about useForm resource please visit this page useForm.

More details about React context React Docs.