Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

FormProps

type FormProps<TFieldValues extends FieldValues, TTransformedValues extends FieldValues | undefined = undefined> = Omit<React.FormHTMLAttributes<HTMLFormElement>, "onError" | "onSubmit"> & Partial<{
control: Control<TFieldValues>;
headers: Record<string, string>;
validateStatus: (status: number) => boolean;
onError: ({ response, error }: {
response: Response;
error?: undefined;
}
| {
response?: undefined;
error: unknown;
}
) => void
;
onSuccess: ({ response }: {
response: Response;
}
) => void
;
onSubmit: TTransformedValues extends FieldValues ? FormSubmitHandler<TTransformedValues> : FormSubmitHandler<TFieldValues>;
method: "post" | "put" | "delete";
render: (props: {
submit: (e?: React.FormEvent) => void;
}
) => React.ReactNode | React.ReactNode[]
;
encType:
| "application/x-www-form-urlencoded"
| "multipart/form-data"
| "text/plain"
| "application/json";
}
>
;

§Type Parameters

§
TFieldValues extends FieldValues
[src]
§
TTransformedValues extends FieldValues | undefined = undefined
[src]

§Type

§
Omit<React.FormHTMLAttributes<HTMLFormElement>, "onError" | "onSubmit"> & Partial<{
control: Control<TFieldValues>;
headers: Record<string, string>;
validateStatus: (status: number) => boolean;
onError: ({ response, error }: {
response: Response;
error?: undefined;
}
| {
response?: undefined;
error: unknown;
}
) => void
;
onSuccess: ({ response }: {
response: Response;
}
) => void
;
onSubmit: TTransformedValues extends FieldValues ? FormSubmitHandler<TTransformedValues> : FormSubmitHandler<TFieldValues>;
method: "post" | "put" | "delete";
render: (props: {
submit: (e?: React.FormEvent) => void;
}
) => React.ReactNode | React.ReactNode[]
;
encType:
| "application/x-www-form-urlencoded"
| "multipart/form-data"
| "text/plain"
| "application/json";
}
>
[src]