Creating our Frontend with React
With our backend ready and eager to respond to requests, we can now prepare our React environment. First, I want to give you a brief overview of what we are going to build.
With the help of our friend, create-react-app
, we will create an app called frontend in our project folder. Then, we will set up Tailwind CSS, our UI library of choice in the same way that we did in the previous chapter, so I will not waste your time repeating the same steps.
I will then give a very brief introduction to React Router, a package that allows us to monitor the URL of our frontend and display different pages accordingly. Finally, I am going to tackle the pages needed for the application that roughly correspond to the path operations: a page for inserting a new car, one for listing and querying them, and one for modifying the price of the car or deleting it. I will make use of the basics that we saw in Chapter 4, Setting Up a React Workflow: create-react-app,...