You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -207,7 +206,7 @@ export default function App() {
207
206
useEffect(() => {
208
207
register("firstName", { required:true })
209
208
register("lastName")
210
-
}, [])
209
+
}, [register])
211
210
212
211
return (
213
212
<form onSubmit={handleSubmit(onSubmit)}>
@@ -240,18 +239,11 @@ Make sure you are not using `value`. The correct property is `defaultValue`.
240
239
241
240
React Hook Form is focusing on uncontrolled inputs, which means you don't need to change the input `value` via `state` via `onChange`. In fact, you don't need `value` at all. You only need to set `defaultValue` for the initial input value.
## React Hook Form, Formik or Redux Form? {#ReactHookFormFormikorReduxForm}
253
245
254
-
First of all, all libs try to solve the same problem: make the form building experience as easy as possible. However, there are some fundamental differences between these three. `react-hook-form` is built with uncontrolled inputs in mind and tries to provide your form with the best performance and least amount of re-renders possible. Additionallly, `react-hook-form` is built with React Hooks and used as a hook, which means there is no Component for you to import. Here are some of the detailed differences:
246
+
First of all, all libs try to solve the same problem: make the form building experience as easy as possible. However, there are some fundamental differences between these three. `react-hook-form` is built with uncontrolled inputs in mind and tries to provide your form with the best performance and least amount of re-renders possible. Additionally, `react-hook-form` is built with React Hooks and used as a hook, which means there is no Component for you to import. Here are some of the detailed differences:
0 commit comments