Socket
Socket
Sign inDemoInstall

react-hook-form

Package Overview
Dependencies
3
Maintainers
1
Versions
1027
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
Previous1
35
103Next

7.44.3-beta.0

Diff

bluebill1049
published 7.44.2 •

bluebill1049
published 7.44.1 •

bluebill1049
published 7.44.0 •

Changelog

Source

[7.44.0] - 2023-06-14

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>

bluebill1049
published 7.44.0-rc.5 •

bluebill1049
published 7.44.0-rc.4 •

bluebill1049
published 7.44.0-rc.3 •

bluebill1049
published 7.44.0-rc.1 •

bluebill1049
published 7.43.9 •

bluebill1049
published 7.43.8 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc