Handling Forms

With most web applications, you will have some kind of a form, a way for your user to communicate with the application. In the case of our application, we need to set up a form for our search functionality.

Setting up the keyword search form

First, you need to declare your form with the form tag in your JSX. You want your search upfront and center when a user loads the site. For this reason, you will place your <form> tag and its contents in the index.js file, which renders your homepage, so place an input tag inside the form tag.

Get hands-on with 1200+ tech skills courses.