Skip to content

Commit b84a9d5

Browse files
authored
Minor (english) updates to documentation (#688)
1 parent 18ed2c6 commit b84a9d5

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 gatsbyjs
3+
Copyright (c) 2019-present Beier(Bill) Luo
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

src/components/ApiGallery.tsx

+12-10
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export default function ApiGallery({ defaultLang }) {
9494
</h3>
9595
<p>
9696
A powerful custom hook to validate your form with minimal
97-
re-render.
97+
re-renders.
9898
</p>
9999
<Link to="/api/useform" aria-label={"read more about useForm"}>
100100
Read More ▸
@@ -107,8 +107,9 @@ export default function ApiGallery({ defaultLang }) {
107107
<code>{`</>`}</code>useController
108108
</h3>
109109
<p>
110-
It is the go-to hook for Controlled components and isolates its
111-
re-render.
110+
For Controlled components: interface with the useForm methods
111+
and and isolate its re-render. Alternative to RHF's Controller
112+
component.
112113
</p>
113114
<Link
114115
to="/api/usecontroller"
@@ -124,8 +125,9 @@ export default function ApiGallery({ defaultLang }) {
124125
<code>{`</>`}</code>useFormContext
125126
</h3>
126127
<p>
127-
Building large forms and would like to access useForm methods in
128-
context.
128+
Access your useForm methods and properties from nested
129+
components, using React context. Great for building larger forms
130+
and shared components!
129131
</p>
130132
<Link
131133
to="/api/useformcontext"
@@ -141,7 +143,7 @@ export default function ApiGallery({ defaultLang }) {
141143
<code>{`</>`}</code>useWatch
142144
</h3>
143145
<p>
144-
Subscribe to individual form input change without impacting the
146+
Subscribe to individual form input changes without impacting the
145147
root component's render.
146148
</p>
147149
<Link to="/api/usewatch" aria-label={"read more about usewatch"}>
@@ -155,8 +157,8 @@ export default function ApiGallery({ defaultLang }) {
155157
<code>{`</>`}</code>useFormState
156158
</h3>
157159
<p>
158-
Subscribe to individual form state update and isolate re-render
159-
at the hook level.
160+
Subscribe to individual form state updates and isolating
161+
re-renders at the hook level.
160162
</p>
161163
<Link
162164
to="/api/useformstate"
@@ -172,8 +174,8 @@ export default function ApiGallery({ defaultLang }) {
172174
<code>{`</>`}</code>useFieldArray
173175
</h3>
174176
<p>
175-
Manage dynamically generate fields on the fly, shuffle, remove
176-
and append fields.
177+
Manage dynamically generated fields on the fly, shuffle, remove
178+
and append fields. Ideal for complex CRUD data entry scenarios.
177179
</p>
178180
<Link
179181
to="/api/usefieldarray"

src/data/home.tsx

+9-9
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ export default {
319319
title: "Less code. More performant",
320320
description: (
321321
<p id="codeComparison" className={typographyStyles.homeParagraph}>
322-
Reducing the amount of code you need to write, and removing
323-
unnecessary re-renders are some of the primary goals of React Hook
324-
Form. Now dive in and explore with the following example:
322+
React Hook Form reduces the amount of code you need to write while
323+
removing unnecssary re-renders. Now dive in and explore with the
324+
following example:
325325
</p>
326326
),
327327
},
@@ -431,9 +431,9 @@ export default {
431431
description: (
432432
<>
433433
<p className={typographyStyles.homeParagraph}>
434-
You have the ability to isolate components re-renders which leads to
434+
You have the ability to isolate component re-renders which leads to
435435
better performance on your page or app. The following example
436-
demonstrates this.
436+
demonstrates this:
437437
</p>
438438
</>
439439
),
@@ -524,9 +524,9 @@ export default {
524524
description: (
525525
<>
526526
<p>
527-
You have the ability to isolate components re-renders which lead to
528-
less performance impact on your page or app. The following example
529-
demonstrate such behaviour.
527+
You have the ability to isolate component re-renders which leads to
528+
better performance impact on your page or app. The following example
529+
demonstrates this:
530530
</p>
531531

532532
<p style={{ fontSize: 14 }}>
@@ -691,7 +691,7 @@ export default {
691691
description: (
692692
<p className={typographyStyles.homeParagraph}>
693693
The following screenshots demonstrate how much faster component
694-
mounting is with React Hook Form compare with others.
694+
mounting is with React Hook Form compared to others:
695695
</p>
696696
),
697697
totalMount: "No. of mount(s)",

0 commit comments

Comments
 (0)