🧮 feat: compute prop for useWatch subscription (#12503)
- subscribe to the entire form but only return updated value with certain condition
type FormValue = {
test: string;
}
const watchedValue = useWatch({
control: methods.control,
compute: (data: FormValue) => {
if (data.test?.length) {
return data.test;
}
return '';
},
});