-
Hello, I was looking through the docs, but could not find any info about this. I know it's possible to watch multiple values by passing an array into the watch-method:
Currently, to store these values in a object, I am referencing the indices of watchValues:
This works fine, but I consider this not optimal when working with larger forms. Is there a smarter way of achieving this without watching all values? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Try storing and utilizing the value using destructuring assignment. It will be a better experience than that. const [date,comment] = watch(["date", "comment"]);
const values = { date, comment }; |
Beta Was this translation helpful? Give feedback.
Try storing and utilizing the value using destructuring assignment. It will be a better experience than that.