Capítulo 13 de 39
getValues(name?, config?) reads current form values on demand without subscribing or re-rendering — the non-reactive counterpart to watch.
formState.dirtyFields/touchedFields.getValues() returns defaultValues from useForm.<input {...register("root.test1")} />
<input {...register("root.test2")} />
getValues() // { root: { test1: '', test2: '' } }
getValues("root") // { test1: '', test2: '' }
getValues("root.test1") // ''
getValues(["root.test1", "root.test2"]) // ['', '']
getValues(undefined, { dirtyFields: true }) // only dirty fields
getValues where a re-render on change is actually needed: it never triggers one — use watch/useWatch for that.getValues is the cheap, non-reactive read; reach for it inside event handlers, submit logic, or anywhere you don't want a subscription.config.dirtyFields/config.touchedFields (7.63.0+) let you pull just the subset of values the user actually changed/touched.dirtyFields/touchedFields the config option filters by.