The next step is to create an add functionality for the frontend. We will implement this using the Material-UI modal dialog. We already went through the utilization of Material-UI modal form in Chapter 9, Useful Third-Party React Components for React. We will add the New Car button to the user interface, which opens the modal form when it is pressed. The modal form contains all the fields that are required to save the car, as well as the button for saving and canceling.
We already installed the Material-UI component library to our frontend app in Chapter 10, Setting Up the Frontend for Our Spring Boot RESTful Web Service.
The following steps show you how to create add functionality using the modal dialog component:
- Create a new file called AddCar.js in the components folder and write some function-class base code to the file, as shown here. Add the imports...