Use react-hook-form for tracking the data, implementing validation for the data inputs. You can learn more about react-hook-form in their documentation (https://react-hook-form.com/). Given below is an example for how the forms are supposed to be used.