Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5c69e15

Browse files
udpate doc on subscribe (#1146)
* udpate doc on subscribe * update doc and packages * rename to just target * update doc * update format
1 parent 5590cd3 commit 5c69e15

26 files changed

+906
-597
lines changed

‎package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
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: 798 additions & 549 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/components/Menu/MenuLinks.ts

Lines changed: 1 addition & 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" },

‎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
}

‎src/components/codeExamples/useFieldArray.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, useFieldArray } from "react-hook-form";
1+
export default `import { useForm, useFieldArray } from "react-hook-form";
32
43
function App() {
54
const { register, control, handleSubmit, reset, trigger, setError } = useForm({

‎src/components/layout.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ body {
5656
-ms-font-feature-settings: "kern", "liga", "clig", "calt";
5757
-webkit-font-feature-settings: "kern", "liga", "clig", "calt";
5858
font-feature-settings: "kern", "liga", "clig", "calt";
59-
font-family: "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell",
60-
"Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
59+
font-family:
60+
"Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
61+
"Droid Sans", "Helvetica Neue", sans-serif;
6162
-webkit-font-smoothing: antialiased;
6263
-moz-osx-font-smoothing: grayscale;
6364
font-size: 0.9rem;

‎src/components/sponsorsList.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ export function SponsorsList() {
2323
>
2424
<img src="/images/route4me.png" alt="route4me" />
2525
</a>
26-
<a href="https://www.follower24.de/" target="_blank" rel="noopener noreferrer">
26+
<a
27+
href="https://www.follower24.de/"
28+
target="_blank"
29+
rel="noopener noreferrer"
30+
>
2731
<img
2832
className={styles.twicsy}
2933
src="/images/follower24.png"

‎src/content/docs/createFormControl.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ This function create the entire form state subscription and allow you to subscri
1818

1919
---
2020

21-
| Name | Type | Description |
22-
| ------------- | ------------------------------ | -------------------------------------------------------------- |
23-
| `formControl` | <TypeText>Object</TypeText> | control object for `useForm` hook |
24-
| `control` | <TypeText>Object</TypeText> | control object for `useController`, `useFormState`, `useWatch` |
25-
| `...returns` | <TypeText>Functions</TypeText> | `useForm` return methods |
21+
| Name | Type | Description |
22+
| ------------- | ------------------------------ | ------------------------------------------------------------------------------------- |
23+
| `formControl` | <TypeText>Object</TypeText> | control object for `useForm` hook |
24+
| `control` | <TypeText>Object</TypeText> | control object for `useController`, `useFormState`, `useWatch` |
25+
| `subscribe` | <TypeText>Function</TypeText> | function to [subscribe](/docs/useform/subscribe) for form state update without render |
26+
| `...returns` | <TypeText>Functions</TypeText> | `useForm` return methods |
2627

2728
<Admonition type="important" title="Notes">
2829
- This function is published at **v7.55.0** - This function is completely

‎src/content/docs/formprovider.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ This following table applied to `FormProvider`, `useFormContext` accepts no argu
2727
---
2828

2929
```javascript copy sandbox="https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi"
30-
import React from "react"
31-
3230
import { useForm, FormProvider, useFormContext } from "react-hook-form"
3331

3432
export default function App() {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /