Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netzo/deps/react-hook-form.ts>ControllerProps

Deno-powered framework for building business web apps
Go to Latest
type alias ControllerProps
Re-export
import { type ControllerProps } from "https://deno.land/x/netzo@0.3.91/deps/react-hook-form.ts";

Render function to provide the control for the field.

Examples

Example 1

const { field, fieldState, formState } = useController();

<Controller
  render={({ field, formState, fieldState }) => ({
    <input
      onChange={field.onChange}
      onBlur={field.onBlur}
      name={field.name}
      ref={field.ref} // optional for focus management
    />
  })}
/>

Type Parameters

optional
TFieldValues extends FieldValues = FieldValues
optional
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
definition: { render: (unnamed 0: { field: ControllerRenderProps<TFieldValues, TName>; fieldState: ControllerFieldState; formState: UseFormStateReturn<TFieldValues>; }) => React.ReactElement; } & UseControllerProps<TFieldValues, TName>