setValues with nested partials wipes untouched sibling values
Author: soroush5Created Sep 17, 2026Updated Sep 17, 2026
Hey! Found that setValues({ user: { profile: { firstName: 'John' } } }) wipes untouched nested siblings (lastName, the whole address subtree) from form state, while the inputs still display them — so submit silently loses data. Bulk-updating one section from server data hits this every time. Happy to PR a fix that deep-merges plain-object subtrees if that helps.
Source: react-hook-form/react-hook-form