How to track changes any fields? #7087
-
How to track changes any fields? I try to do it in useEffect for this I set watch() in deps, but watch() changes not once, and useEfferct react for this. How to do it right? |
Beta Was this translation helpful? Give feedback.
Answered by
ritikbanger
Nov 19, 2021
Replies: 1 comment 5 replies
-
Use onChange method for this. It will track down the changes. You can add mode: onChange in your useForm or custom onChange method in your field. Bonus: If you are doing this for validation, use Yup resolver. |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
balex777
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use onChange method for this. It will track down the changes. You can add mode: onChange in your useForm or custom onChange method in your field.
Bonus: If you are doing this for validation, use Yup resolver.