Skip to content
Advertisement

Tag: react-hook-form

React – Unhandled Rejection (TypeError): e.preventDefault is not a function

I’m getting this error below when I try to implement an Axios post with react-hook-form: The problem started occuring when I added onSubmit={handleSubmit(handleSubmitAxios)} to my <form>. Basically, I want my form to be controlled by react-hook-form, using my custom handleSubmitAxios post call that communicates with my backend. This is for my sign-in component, currently just testing out the functionality of

What are major differences between Controlled and Uncontrolled Components in react-hooks-form?

I am using react hooks form. I read from documentation about controlled and uncontrolled. Controlled and this is UnControlled form Can somebody please tell what difference does it makes? And what do i gain by making controlled components instead of uncontrolled? Answer React Hook Form embraces uncontrolled form and input, which means you can still build controlled form and input

Advertisement