I am using useForm and had the result in a dependency array. I noticed that it caused needless executions. I ended up destructuring the result of useForm and adding those items to the dependency array. I noticed it worked except for resetDirty. It appears it's the only action not wrapped in a useCallback. I don't see any reason why it couldn't be so I cut a quick PR.
I am using
useForm
and had the result in a dependency array. I noticed that it caused needless executions. I ended up destructuring the result ofuseForm
and adding those items to the dependency array. I noticed it worked except forresetDirty
. It appears it's the only action not wrapped in auseCallback
. I don't see any reason why it couldn't be so I cut a quick PR.Semi-related issue: https://github.com/mantinedev/mantine/issues/5338