Okay
  Print

React Hook Form

As you know already we are using react-hook-form. react-hook-form works a bit differently than other react form libraries. It has its own state management system to make it performant, preventing unnecessary rending and you don't have to manage the state by yourself. You can find more about this from their oficial docs here https://react-hook-form.com/

As they are doing the form fields stage management for you, you don't need to do the onChange here to handle the state or the field data like input field, select field etc. What you will need is access to that data during submission or at any given time. Submission data is already shown in our different forms example which you can check (you can check componets/product directory). Also to be fluent with React hook form you need to understand their docs, APIs from here https://react-hook-form.com/. Lots of examples can be found here https://github.com/react-hook-form/react-hook-form/tree/master/examples . React select example is available here https://codesandbox.io/s/react-hook-form-v7-controller-5h1q5. you can use their watch to access fields data at any given time https://react-hook-form.com/get-started. Hope these resources should be enough for you to understand the react-hook-form uses in our forms.