Packages

react-hook-form

7.91.0 · 23 Oct 2026MIT42M / weekRepositoryHomepagenpmAtom feed

Your version

7.44.0

27 May 2023Where it was published

7.91.0 is the newest release of 7.x.

In short

3 new

Release note

Added

  • New <Form /> component

// Send post request with formData
<Form
  action="/api"
  control={control}
  onSuccess={() => {
    alert("Great");
  }}
/>

// Send post request with json form data
<Form action="/api" encType="application/json" headers={{ accessToken: 'test' }}>
  {errors.root?.server.type === 500 && 'Error message'}
  {errors.root?.server.type === 400 && 'Error message'}
</Form>

// Send post request with formData with fetch
<Form
  onSubmit={async ({ formData, data, formDataJson, event }) => {
    await fetch("api", {
      method: "post",
      body: formData,
    });
  }}
/>
  • Support TransformedValues with useFormContext

useFormContext<FormValue, TransformedValues>()

  • Added TTransformedValues to FormProvider

FormProviderProps<TFieldValues, TContext, TTransformedValues>