react-hook-form - how to reset formState.isDirty after form submitting

Viewed 30

as I wrote in the title, please give me a hint on how to reset isDirty field from formState object.

In my application, I have a 'save' button which is disabled by default. When I change the value of any input the button is set to enabled because isDirty state is changed to true. After a successful save action, I want to make my save button disabled again (so I need to set isDirty as false again).

1 Answers
Related