-
Book Overview & Buying
-
Table Of Contents
ASP.NET Core 5 and React - Second Edition
By :
In this section, we are going to use a popular forms library called React Hook Form. This library reduces the amount of code we need to write when implementing forms. Once we have installed React Hook Form, we will refactor the search form we created in the previous section. We will then use React Hook Form to implement forms for asking a question and answering a question.
Let's install React Hook Form by entering the following command into the Terminal:
> npm install react-hook-form
After a few seconds, React Hook Form will be installed.
The react-hook-form package includes TypeScript types, so these aren't in a separate package that we need to install.
Next, we will start to use React Hook Form for the search form in the Header component.
We are going to use React Hook Form to reduce the amount of code in the Header...