formbold-react
Version:
Formbold package for react.
14 lines (13 loc) • 502 B
TypeScript
import { CaptchaRef, Config, ErrorState } from './types';
/**
* FormBold useForm hook
* @param formId - The form ID
* @param config - Configuration options
* @returns An array containing the form state and the submit handler
*/
declare const useForm: (formId: string, config?: Config) => readonly [{
readonly error: ErrorState;
readonly succeeded: boolean;
readonly submitting: boolean;
}, (e: React.FormEvent<HTMLFormElement>, recaptchaRef?: CaptchaRef) => void];
export { useForm };