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

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

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
function Form
import { Form } from "https://deno.land/x/netzo@0.5.63/deps/react-hook-form.ts";

Form component to manage submission.

Examples

Example 1

function App() {
  const { control, formState: { errors } } = useForm();

  return (
    <Form action="/api" control={control}>
      <input {...register("name")} />
      <p>{errors?.root?.server && 'Server error'}</p>
      <button>Submit</button>
    </Form>
  );
}

Type Parameters

T extends FieldValues
optional
U extends FieldValues | undefined = undefined

Parameters

props: FormProps<T, U>

Returns

React.JSX.Element

form component or headless render prop.