Creating the React project for the frontend
Before we start coding the frontend, we have to create a new React app. We will use TypeScript in our React frontend:
- Open PowerShell, or any other suitable terminal. Create a new React app by typing the following command:
npm create vite@4
In this book, we are using Vite version 4.4. You can also use the latest version, but then you have to check for changes in the Vite documentation.
- Name your project
carfront
, and select the React framework and TypeScript variant:
Figure 12.4: Frontend project
- Move to the project folder and install dependencies by typing the following commands:
cd carfront npm install
- Install the MUI component library by typing the following command, which installs the Material UI core library and two Emotion libraries. Emotion is a library designed for writing CSS with JavaScript (https://emotion.sh/docs/introduction...