Skip to content

Commit 22b0d23

Browse files
author
ria-ahyoung
committed
chore: re-run prettier format (ci warning)
1 parent f1d4164 commit 22b0d23

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/content/docs/usewatch/watch.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,31 @@ A React Hook Form component that provides the same functionality as `useWatch`,
2020
| `defaultValue` | <TypeText>unknown</TypeText> | default value for `useWatch` to return before the initial render.<br/><br/>**Note:** the first render will always return `defaultValue` when it's supplied. |
2121
| `disabled` | <TypeText>boolean = false</TypeText> | Option to disable the subscription. |
2222
| `exact` | <TypeText>boolean = false</TypeText> | This prop will enable an exact match for input name subscriptions. |
23-
| `render` | <TypeText>Function</TypeText> | 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. |
23+
| `render` | <TypeText>Function</TypeText> | 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. |
2424

2525
**Examples:**
2626

2727
---
2828

2929
```tsx copy sandbox=""
30-
import { useForm, Watch } from 'react-hook-form';
30+
import { useForm, Watch } from "react-hook-form"
3131

3232
const App = () => {
33-
const { register, control } = useForm();
33+
const { register, control } = useForm()
3434

3535
return (
3636
<div>
3737
<form>
38-
<input {...register('foo')} />
39-
<input {...register('bar')} />
38+
<input {...register("foo")} />
39+
<input {...register("bar")} />
4040
</form>
4141
{/* re-render only when value of `foo` changes */}
4242
<Watch
4343
control={control}
44-
names={['foo']}
44+
names={["foo"]}
4545
render={([foo]) => <span>{foo}</span>}
4646
/>
4747
</div>
48-
);
49-
};
48+
)
49+
}
5050
```

0 commit comments

Comments
 (0)