From 9b74854ac1ead95127dc592e2425a54c4703c2e6 Mon Sep 17 00:00:00 2001 From: ria-ahyoung Date: Fri, 10 Oct 2025 23:16:22 +0900 Subject: [PATCH 1/3] fix: modify broken legacy API links in version tab (v6/v5) --- src/components/ApiGallery.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ApiGallery.tsx b/src/components/ApiGallery.tsx index 2cbd410fc..a7dd70fa2 100644 --- a/src/components/ApiGallery.tsx +++ b/src/components/ApiGallery.tsx @@ -18,7 +18,7 @@ export default function ApiGallery() { if (version !== 7) { router.push( - `https://react-hook-form-website-git-leagcy-hook-form.vercel.app/${version}/api` + `https://react-hook-form-website-git-leagcy-hook-form.vercel.app/v${version}/api` ) } else { router.push(`/v${version}/docs/`) From f1d4164bad3f303a21e17ed0ef63f25c22f80ada Mon Sep 17 00:00:00 2001 From: ria-ahyoung Date: Sun, 19 Oct 2025 14:44:20 +0900 Subject: [PATCH 2/3] chore: fix lint error in example code --- .../docs/useformstate/errormessage.mdx | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/content/docs/useformstate/errormessage.mdx b/src/content/docs/useformstate/errormessage.mdx index a3e67ff44..69227c022 100644 --- a/src/content/docs/useformstate/errormessage.mdx +++ b/src/content/docs/useformstate/errormessage.mdx @@ -155,15 +155,18 @@ export default function App() { ``` ```javascript copy sandbox="https://codesandbox.io/s/react-hook-form-v7-errormessage-multiple-error-messages-lnvkt" -import { useForm } from "react-hook-form"; -import { ErrorMessage } from '@hookform/error-message'; - +import { useForm } from "react-hook-form" +import { ErrorMessage } from "@hookform/error-message" export default function App() { - const { register, formState: { errors }, handleSubmit } = useForm({ - criteriaMode: "all" - }); - const onSubmit = data => console.log(data); + const { + register, + formState: { errors }, + handleSubmit, + } = useForm({ + criteriaMode: "all", + }) + const onSubmit = (data) => console.log(data) return (
@@ -172,12 +175,12 @@ export default function App() { required: "This is required.", pattern: { value: /d+/, - message: "This input is number only." + message: "This input is number only.", }, maxLength: { value: 10, - message: "This input exceed maxLength." - } + message: "This input exceed maxLength.", + }, })} /> - - ); + ) } - ``` From 22b0d2352866eb0c35c52faeafab3ed4b1b69e01 Mon Sep 17 00:00:00 2001 From: ria-ahyoung Date: Thu, 23 Oct 2025 13:07:20 +0900 Subject: [PATCH 3/3] chore: re-run prettier format (ci warning) --- src/content/docs/usewatch/watch.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/content/docs/usewatch/watch.mdx b/src/content/docs/usewatch/watch.mdx index b50f6a693..bf327bb5b 100644 --- a/src/content/docs/usewatch/watch.mdx +++ b/src/content/docs/usewatch/watch.mdx @@ -20,31 +20,31 @@ A React Hook Form component that provides the same functionality as `useWatch`, | `defaultValue` | unknown | default value for `useWatch` to return before the initial render.

**Note:** the first render will always return `defaultValue` when it's supplied. | | `disabled` | boolean = false | Option to disable the subscription. | | `exact` | boolean = false | This prop will enable an exact match for input name subscriptions. | -| `render` | Function | Subscribes to specified form field(s) and re-renders its child function whenever the values change. This allows you to declaratively consume form values in JSX without manually wiring up state. | +| `render` | Function | Subscribes to specified form field(s) and re-renders its child function whenever the values change. This allows you to declaratively consume form values in JSX without manually wiring up state. | **Examples:** --- ```tsx copy sandbox="" -import { useForm, Watch } from 'react-hook-form'; +import { useForm, Watch } from "react-hook-form" const App = () => { - const { register, control } = useForm(); + const { register, control } = useForm() return (
- - + +
{/* re-render only when value of `foo` changes */} {foo}} />
- ); -}; + ) +} ```