Consoling useWatch Value after reset form is still giving old value #9498
-
I have to do some stuff after reset a form. And using useWatch Value after reset Form but it still consoling the old value `import React, { useEffect } from "react"; export default function App() { Hello CodeSandbox <button type="button" onClick={() => onFormReset()}> Do Reset ); }` Is something wrong I am doing ? codesandbox - https://codesandbox.io/s/exciting-surf-595j79?file=/src/App.js:0-689 @bluebill1049 Please help |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
useWatch return value is utilised for render function, not within the callback function, you may want to use |
Beta Was this translation helpful? Give feedback.
useWatch return value is utilised for render function, not within the callback function, you may want to use
getValues()
instead.