⬆ ️ deps: Bump react-hook-form from 7.23.0 to 7.25.1
Bumps react-hook-form from 7.23.0 to 7.25.1.
Release notes
Sourced from react-hook-form's releases.
Version 7.25.1
🐞 fix #7662 issue withreset
file input (#7656)🚗 improve perf with get proxy formState (#7655)🏋 ️ remove redundant check (#7651)🐞 fix #7648 Unable tosetFocus
to Controller after reset (#7649)🐞 fix:getFieldState
- error might be undefined (#7636)⛑ improve useFieldArray code consistency (#7628)thanks to
@Moshyfawn
and@michalbundyra
Version 7.25.0
✨ newgetFieldState
API: get individual field stateDocumentation: https://react-hook-form.com/api/useform/getfieldstate
import * as React from "react"; import { useForm } from "react-hook-form"; export default function App() { const { register, getFieldState, formState: { isDirty, isValid } } = useForm({ mode: "onChange", defaultValues: { firstName: "" } }); // you can invoke before render or within the render function const fieldState = getFieldState("firstName"); return ( <form> <input {...register("firstName", { required: true })} /> <p>{getFieldState("firstName").isDirty && "dirty"}</p> <p>{getFieldState("firstName").isTouched && "touched"}</p> <button type="button" onClick={() => console.log(getFieldState("firstName"))}> field state </button> </form> ); }
Version 7.24.2
😰 close #7593 regression on fieldarraycontroller
/useController
unmount withunregister
(#7596) 🥸 fix type issue with getFieldState and useController (#7574)
... (truncated)
Changelog
Sourced from react-hook-form's changelog.
Changelog
[7.24.0] - 2022-1-14
useController
return prop:onChange
,onBlur
andref
will be memorized withuseCallback
Commits
-
954be6d
7.25.1 -
c0ff117
🐞 fix #7662 issue with reset file input (#7656) -
806f78c
🚗 improve perf with get proxy formState (#7655) -
08c04e8
🏋 ️ remove redundant check (#7651) -
a44874a
🐞 fix #7648 Unable to setFocus to Controller after reset (#7649) -
40d05c5
🐞 fix: getFieldState - error might be undefined (#7636) -
6da9662
⛑ improve useFieldArray code consistency (#7628) -
d5bc268
👩 🎤 cleanup features for readme -
450fdef
7.25.0 -
2251b86
❤ ️ thank you hjaber for sponsoring - Additional commits viewable in compare view