Files
url_tracker_tool/node_modules/react-hook-form/dist/useForm.d.ts
Andrei 58f8093689 Rebrand from 'Redirect Intelligence v2' to 'URL Tracker Tool V2' throughout UI
- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
2025-08-19 19:12:23 +00:00

32 lines
1.3 KiB
TypeScript

import type { FieldValues, UseFormProps, UseFormReturn } from './types';
/**
* Custom hook to manage the entire form.
*
* @remarks
* [API](https://react-hook-form.com/docs/useform) • [Demo](https://codesandbox.io/s/react-hook-form-get-started-ts-5ksmm) • [Video](https://www.youtube.com/watch?v=RkXv4AXXC_4)
*
* @param props - form configuration and validation parameters.
*
* @returns methods - individual functions to manage the form state. {@link UseFormReturn}
*
* @example
* ```tsx
* function App() {
* const { register, handleSubmit, watch, formState: { errors } } = useForm();
* const onSubmit = data => console.log(data);
*
* console.log(watch("example"));
*
* return (
* <form onSubmit={handleSubmit(onSubmit)}>
* <input defaultValue="test" {...register("example")} />
* <input {...register("exampleRequired", { required: true })} />
* {errors.exampleRequired && <span>This field is required</span>}
* <button>Submit</button>
* </form>
* );
* }
* ```
*/
export declare function useForm<TFieldValues extends FieldValues = FieldValues, TContext = any, TTransformedValues = TFieldValues>(props?: UseFormProps<TFieldValues, TContext, TTransformedValues>): UseFormReturn<TFieldValues, TContext, TTransformedValues>;
//# sourceMappingURL=useForm.d.ts.map