Skip to content

Commit eba590b

Browse files
committed
update lint
1 parent a47bf25 commit eba590b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/components/sponsorsList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function SponsorsList() {
2121
target="_blank"
2222
rel="noopener noreferrer"
2323
>
24-
<img src="/images/route4me.png" alt="route4me"/>
24+
<img src="/images/route4me.png" alt="route4me" />
2525
</a>
2626
<a
2727
href="https://www.follower24.de/"

src/content/docs/useform/formstate.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ This object contains information about the entire form state. It helps you to ke
3535
| `disabled` | <TypeText>boolean</TypeText> | Set to true if the form is disabled via the disabled prop in [useForm](/docs/useform). |
3636
| `isReady` | <TypeText>boolean</TypeText> | Set to true when `formState` subscription setup is ready. <ul><li><p>Renders children before the parent completes setup. If you're using `useForm` methods (eg. `setValue`) in a child before the subscription is ready, it can cause issues. Use an `isReady` flag to ensure the form is initialized before updating state from the child.</p><CodeArea withOutCopy rawData={`const {\n setValue,\n formState: { isReady }\n} = useForm();\n\n// Parent component: ✅ \nuseEffect(() => setValue('test', 'data'), []) \n\n// Children component: ✅ \nuseEffect(() => isReady && setValue('test', 'data'), [isReady])`}/></li></ul> |
3737

38-
3938
<Admonition type="important" title="Rules">
4039

4140
<ul>

src/content/ts.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,13 @@ type FormValues = {
9696
export default function App() {
9797
const { register, handleSubmit } = useForm<FormValues>()
9898
const onSubmit: SubmitHandler<FormValues> = (data) => console.log(data)
99-
const onError: SubmitErrorHandler<FormValues> = (errors) => console.log(errors);
99+
const onError: SubmitErrorHandler<FormValues> = (errors) =>
100+
console.log(errors)
100101

101102
return (
102103
<form onSubmit={handleSubmit(onSubmit, onError)}>
103-
<input {...register("firstName"), { required: true }} />
104-
<input {...register("lastName"), { minLength: 2 }} />
104+
<input {...(register("firstName"), { required: true })} />
105+
<input {...(register("lastName"), { minLength: 2 })} />
105106
<input type="email" {...register("email")} />
106107

107108
<input type="submit" />

0 commit comments

Comments
 (0)