/// import { ControllerProps, FieldValues } from './types'; /** * Component based on `useController` hook to work with controlled component. * * @remarks * [API](https://react-hook-form.com/api/usecontroller/controller) • [Demo](https://codesandbox.io/s/react-hook-form-v6-controller-ts-jwyzw) • [Video](https://www.youtube.com/watch?v=N2UNk_UCVyA) * * @param props - the path name to the form field value, and validation rules. * * @returns provide field handler functions, field and form state. * * @example * ```tsx * function App() { * const { control } = useForm({ * defaultValues: { * test: "" * } * }); * * return ( * * ( * <> * * {formState.isSubmitted ? "submitted" : ""} * {fieldState.isTouched ? "touched" : ""} * > * )} * /> * * ); * } * ``` */ declare const Controller: = import("./types").Path>(props: ControllerProps) => import("react").ReactElement>; export { Controller }; //# sourceMappingURL=controller.d.ts.map
{formState.isSubmitted ? "submitted" : ""}
{fieldState.isTouched ? "touched" : ""}