Skip to content

Commit 0b2d942

Browse files
authored
Merge branch 'master' into handleSubmit-error-handling-example
2 parents 36c1485 + 51a861b commit 0b2d942

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1750
-804
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
"clsx": "^1.2.1",
1313
"contentlayer": "^0.3.4",
1414
"little-state-machine": "^4.8.1",
15-
"next": "15.1.2",
15+
"next": "^15.1.2",
1616
"next-contentlayer": "^0.3.4",
1717
"next-themes": "^0.2.1",
1818
"prism-react-renderer": "^2.4.1",
19-
"prismjs": "^1.29.0",
19+
"prismjs": "^1.30.0",
2020
"react": "18.3.1",
2121
"react-dom": "18.3.1",
2222
"react-github-btn": "1.4.0",
@@ -46,8 +46,8 @@
4646
"eslint-plugin-react-hooks": "5.1.0",
4747
"husky": "^8.0.3",
4848
"lint-staged": "^13.3.0",
49-
"prettier": "^3.4.2",
50-
"typescript": "^5.7.3",
49+
"prettier": "^3.5.3",
50+
"typescript": "^5.8.3",
5151
"typescript-eslint": "8.18.1"
5252
},
5353
"keywords": [

pnpm-lock.yaml

Lines changed: 799 additions & 550 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/images/follower24.png

3.23 KB
Loading

src/components/ApiGallery.tsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ export default function ApiGallery() {
1717
)
1818

1919
if (version !== 7) {
20-
router.push(`https://legacy.react-hook-form.com/v${version}/api`)
20+
router.push(
21+
`https://react-hook-form-website-git-leagcy-hook-form.vercel.app/${version}/api`
22+
)
2123
} else {
2224
router.push(`/v${version}/docs/`)
2325
}
@@ -160,6 +162,20 @@ export default function ApiGallery() {
160162
</Link>
161163
</div>
162164
</li>
165+
<li>
166+
<div>
167+
<h3>
168+
<code>{`</>`}</code>useLens
169+
</h3>
170+
<p>
171+
Type-safe lenses for building reusable and shareable form
172+
components with precise focus on form fields.
173+
</p>
174+
<Link href="/docs/uselens" aria-label="read more about useLens">
175+
Read More ▸
176+
</Link>
177+
</div>
178+
</li>
163179
<li>
164180
<div>
165181
<h3>

src/components/Footer.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
.links > li > a {
3535
text-decoration: none;
3636
color: var(--color-text);
37-
padding: 10px 12px;
37+
padding: 10px 8px;
3838
min-width: 48px;
3939
min-height: 48px;
4040
}

src/components/Footer.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ export default function Footer() {
3939
<li>
4040
<Link href="/media">Media</Link>
4141
</li>
42+
<li>
43+
<Link href="https://react-hook-form-website-git-leagcy-hook-form.vercel.app/v6/api">
44+
V6
45+
</Link>
46+
</li>
47+
<li>
48+
<Link href="https://react-hook-form-website-git-leagcy-hook-form.vercel.app/v5/api">
49+
V5
50+
</Link>
51+
</li>
4252
</ul>
4353
<p>
4454
A project by{" "}

src/components/FormStateApi.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export const FormStateApi = ({
183183
<code>validatingFields</code>
184184
</td>
185185
<td>
186-
<code className={typographyStyles.typeText}>boolean</code>
186+
<code className={typographyStyles.typeText}>object</code>
187187
</td>
188188
<td>{(api || API).formState.validatingFields}</td>
189189
</tr>

src/components/Menu/MenuLinks.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ export const apiLinks: Pages = [
107107
{ pathname: "/docs/useform/unregister", name: "unregister" },
108108
{ pathname: "/docs/useform/formstate", name: "formState" },
109109
{ pathname: "/docs/useform/watch", name: "watch" },
110+
{ pathname: "/docs/useform/subscribe", name: "subscribe" },
110111
{ pathname: "/docs/useform/handlesubmit", name: "handleSubmit" },
111112
{ pathname: "/docs/useform/reset", name: "reset" },
112113
{ pathname: "/docs/useform/resetfield", name: "resetField" },
@@ -159,6 +160,10 @@ export const apiLinks: Pages = [
159160
pathname: "/docs/usefieldarray",
160161
name: "useFieldArray",
161162
},
163+
{
164+
pathname: "/docs/uselens",
165+
name: "useLens",
166+
},
162167
{
163168
pathname: "/docs/createFormControl",
164169
name: "createFormControl",

src/components/codeExamples/formState.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
export default `import React from "react";
2-
import { useForm } from "react-hook-form";
1+
export default `import { useForm } from "react-hook-form";
32
43
export default function App() {
54
const {

src/components/codeExamples/formStateUseEffectTs.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
export default `import React from "react";
2-
import { useForm } from "react-hook-form";
1+
export default `import { useForm } from "react-hook-form";
32
type FormInputs = {
43
test: string
54
}

0 commit comments

Comments
 (0)