Let's create the React and TypeScript app with CRA by carrying out the following steps:
- Open Visual Studio Code in the QandA folder we created earlier. Note that we shouldn't be inside the backend folder.
- Open the Terminal in Visual Studio Code, which can be found in the View menu or by pressing Ctrl + '. Execute the following command in the Terminal:
> npx create-react-app frontend --typescript
The npx tool is part of npm that temporarily installs the create-react-app npm package and uses it to create our project.
The --typescript option will create our React project with TypeScript.
- If we look in the src folder, we'll see that the App component has a tsx extension. This means that this is a TypeScript component. ...