Hero Hook Form API / EnhancedFormState
Interface: EnhancedFormState<T>
Defined in: hooks/useEnhancedFormState.ts:11
Enhanced form state with submission tracking and error management.
Type Parameters
T
T extends FieldValues
The form data type
Properties
status
status:
"error"|"success"|"idle"|"submitting"
Defined in: hooks/useEnhancedFormState.ts:12
isSubmitting
isSubmitting:
boolean
Defined in: hooks/useEnhancedFormState.ts:13
isSuccess
isSuccess:
boolean
Defined in: hooks/useEnhancedFormState.ts:14
isError
isError:
boolean
Defined in: hooks/useEnhancedFormState.ts:15
error?
optionalerror:string
Defined in: hooks/useEnhancedFormState.ts:16
submittedData?
optionalsubmittedData:T
Defined in: hooks/useEnhancedFormState.ts:17
touchedFields
touchedFields:
Set<Path<T>>
Defined in: hooks/useEnhancedFormState.ts:18
dirtyFields
dirtyFields:
Set<Path<T>>
Defined in: hooks/useEnhancedFormState.ts:19
hasErrors
hasErrors:
boolean
Defined in: hooks/useEnhancedFormState.ts:20
errorCount
errorCount:
number
Defined in: hooks/useEnhancedFormState.ts:21
handleSuccess()
handleSuccess: (
data) =>void
Defined in: hooks/useEnhancedFormState.ts:22
Parameters
data
T
Returns
void
handleError()
handleError: (
error) =>void
Defined in: hooks/useEnhancedFormState.ts:23
Parameters
error
string
Returns
void
reset()
reset: () =>
void
Defined in: hooks/useEnhancedFormState.ts:24
Returns
void