Skip to content

Commit 8f0218b

Browse files
committed
docs: add note to useController page as well
1 parent 30f7d93 commit 8f0218b

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/data/api.tsx

+10-5
Original file line numberDiff line numberDiff line change
@@ -787,11 +787,7 @@ setValue('test', '')
787787
Set to <code>true</code> during validation.
788788
</>
789789
),
790-
validatingFields: (
791-
<>
792-
Capture fields which are getting async validation.
793-
</>
794-
),
790+
validatingFields: <>Capture fields which are getting async validation.</>,
795791
},
796792
errors: {
797793
title: "errors",
@@ -2936,6 +2932,15 @@ const { field: checkbox } = useController({ name: 'test1' })
29362932
<code>Controller</code>. It's useful for creating reusable Controlled
29372933
input.
29382934
</p>
2935+
<p>
2936+
<strong>Note:</strong> if you simply want to control a field's value
2937+
from outside the form, it's not necessary to use{" "}
2938+
<code>useController</code>. You can simply use the{" "}
2939+
<Link href="/docs/useform#values">
2940+
<code>values</code>
2941+
</Link>{" "}
2942+
option of <code>useForm</code>.
2943+
</p>
29392944
</>
29402945
),
29412946
},

0 commit comments

Comments
 (0)