Skip to content

Commit 0fc711b

Browse files
committed
udpate doc on subscribe
1 parent 5590cd3 commit 0fc711b

File tree

20 files changed

+85
-35
lines changed

20 files changed

+85
-35
lines changed

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/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/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() {

src/content/docs/usecontroller/controller.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ function App() {
9696
```
9797

9898
```javascript copy sandbox="https://codesandbox.io/s/react-hook-form-v7-controller-5h1q5"
99-
import React from "react"
10099
import ReactDatePicker from "react-datepicker"
101100
import { TextField } from "@material-ui/core"
102101
import { useForm, Controller } from "react-hook-form"

src/content/docs/useform.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,6 @@ npm install @hookform/resolvers
442442
<TabGroup buttonLabels={["Yup","Zod","Joi","Ajv","Vest", "Custom"]}>
443443

444444
```typescript copy sandbox="https://codesandbox.io/s/react-hook-form-apply-validation-ts-forked-nmbyh"
445-
import React from "react"
446445
import { useForm } from "react-hook-form"
447446
import { yupResolver } from "@hookform/resolvers/yup"
448447
import * as yup from "yup"
@@ -507,7 +506,6 @@ const App = () => {
507506
```
508507

509508
```typescript copy sandbox="https://codesandbox.io/s/react-hook-form-joiresolver-v6-ts-forked-5pseh"
510-
import React from "react";
511509
import { useForm } from "react-hook-form";
512510
import { joiResolver } from "@hookform/resolvers/joi";
513511
import Joi from "joi";

src/content/docs/useform/control.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ This object contains methods for registering components into React Hook Form.
2121
<TabGroup buttonLabels={["TS", "JS"]}>
2222

2323
```typescript copy sandbox="https://codesandbox.io/s/react-hook-form-v6-controller-ts-jwyzw"
24-
import React from "react"
2524
import { useForm, Controller } from "react-hook-form"
2625
import { TextField } from "@material-ui/core"
2726

src/content/docs/useform/getvalues.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ The example below shows what to expect when you invoke `getValues` method.
5050
<TabGroup buttonLabels={["TS", "JS", "Types"]}>
5151

5252
```typescript copy sandbox="https://codesandbox.io/s/react-hook-form-v7-ts-getvalues-txsfg"
53-
import React from "react"
5453
import { useForm } from "react-hook-form"
5554

5655
type FormInputs = {

0 commit comments

Comments
 (0)