Creating the list page
In the first phase, we will create the list page to show cars with paging, filtering, and sorting features. Run your unsecured Spring Boot backend. The cars can be fetched by sending the GET
request to the http://localhost:8080/api/cars
URL, as shown in Chapter 4, Creating a RESTful Web Service with Spring Boot.
Now, let's inspect the JSON data from the response. The array of cars can be found in the _embedded.cars
node of the JSON response data.
Once we know how to fetch cars from the backend, we are ready to implement the list page to show the cars. The following steps describe this in practice:
- Open the
carfront
React app with VS Code (the React app we created in the previous chapter). - When the app has multiple components, it is recommended that you create a folder for them. Create a new folder called
components
in thesrc
folder. With VS Code, you can create a folder by right...