import { Control, DeepPartialSkipArrayKey, FieldPath, FieldPathValue, FieldPathValues, FieldValues, UnpackNestedValue } from './types'; /** * Subscribe to the entire form values change and re-render at the hook level. * * @remarks * * [API](https://react-hook-form.com/api/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e) * * @param props - defaultValue, disable subscription and match exact name. * * @example * ```tsx * const { watch } = useForm(); * const values = useWatch({ * control, * defaultValue: { * name: "data" * }, * exact: false, * }) * ``` */ export declare function useWatch(props: { defaultValue?: DeepPartialSkipArrayKey; control?: Control; disabled?: boolean; exact?: boolean; }): DeepPartialSkipArrayKey; /** * Custom hook to subscribe to field change and isolate re-rendering at the component level. * * @remarks * * [API](https://react-hook-form.com/api/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e) * * @param props - defaultValue, disable subscription and match exact name. * * @example * ```tsx * const { watch } = useForm(); * const values = useWatch({ * control, * name: "fieldA", * defaultValue: "default value", * exact: false, * }) * ``` */ export declare function useWatch = FieldPath>(props: { name: TFieldName; defaultValue?: FieldPathValue; control?: Control; disabled?: boolean; exact?: boolean; }): FieldPathValue; /** * Custom hook to subscribe to field change and isolate re-rendering at the component level. * * @remarks * * [API](https://react-hook-form.com/api/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e) * * @param props - defaultValue, disable subscription and match exact name. * * @example * ```tsx * const { watch } = useForm(); * const values = useWatch({ * control, * name: ["fieldA", "fieldB"], * defaultValue: { * fieldA: "data", * fieldB: "data" * }, * exact: false, * }) * ``` */ export declare function useWatch[] = readonly FieldPath[]>(props: { name: readonly [...TFieldNames]; defaultValue?: UnpackNestedValue>; control?: Control; disabled?: boolean; exact?: boolean; }): FieldPathValues; /** * Custom hook to subscribe to field change and isolate re-rendering at the component level. * * @remarks * * [API](https://react-hook-form.com/api/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e) * * @example * ```tsx * // can skip passing down the control into useWatch if the form is wrapped with the FormProvider * const values = useWatch() * ``` */ export declare function useWatch[] = FieldPath[]>(): FieldPathValues; //# sourceMappingURL=useWatch.d.ts.map