Reactjs – Auto submit when state is true with react-hook-form
I have a toggle button to turn auto mode on and off, but I don't know how to make react-hook-form automatically submit when this button is turned on. I have tried document.querySelector('form').requestSubmit() but it didn't work. Is there a way…