To get started, you need Node.js installed, basic knowledge of React and TypeScript, and a modern code editor.
First, open your terminal window and go to the directory where you want to build your project. Then use create-react-app with --template typescript:
npx create-react-app cra-typescript-example --template typescript
The Window will display this message:
Creating a new React app in [..]/cra-typescript-example. Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template-typescript...
The --template typescript instructs the Create React App script to build, using the cra-template-typescript format. This will add the main Typescript package.
When the installation is complete, you will have a new React app with TypeScript support. Navigate to your project directory and you can open it in your code editor.