useFormHandler
Call Signature
Section titled “Call Signature”useFormHandler<
T>(form,event,handler):void
Defined in: hooks.ts:80
Add a submission handler to the form with automatic cleanup
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”Form<T>
Form instance
"willSubmit"
Submission phase of the handler (willSubmit, submit or didSubmit)
handler
Section titled “handler”(abortSignal: AbortSignal) => Promise<boolean>
Handler to add
Returns
Section titled “Returns”void
Remarks
Section titled “Remarks”No memoization of the handler is needed as it is stored in a ref internally.
Call Signature
Section titled “Call Signature”useFormHandler<
T>(form,event,handler):void
Defined in: hooks.ts:85
Add a submission handler to the form with automatic cleanup
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”Form<T>
Form instance
"submit"
Submission phase of the handler (willSubmit, submit or didSubmit)
handler
Section titled “handler”(abortSignal: AbortSignal) => Promise<boolean>
Handler to add
Returns
Section titled “Returns”void
Remarks
Section titled “Remarks”No memoization of the handler is needed as it is stored in a ref internally.
Call Signature
Section titled “Call Signature”useFormHandler<
T>(form,event,handler):void
Defined in: hooks.ts:90
Add a submission handler to the form with automatic cleanup
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”Form<T>
Form instance
"didSubmit"
Submission phase of the handler (willSubmit, submit or didSubmit)
handler
Section titled “handler”(succeed: boolean) => void
Handler to add
Returns
Section titled “Returns”void
Remarks
Section titled “Remarks”No memoization of the handler is needed as it is stored in a ref internally.