Skip to main content

Create Your First React App

Open a terminal or command prompt and navigate to the location where you want to create your project. Type the following command to create a new React project with TypeScript:

npx create-react-app my-app --template typescript

Replace "my-app" with the name of your project. This will create a new React project in the "my-app" folder and install all of the required dependencies, including the TypeScript types for React.

Once the project has been created, you can start the development server by typing the following command in the terminal or command prompt:

npm start

This will start the development server and open a new browser window with your React application.

You can now start developing your React application with TypeScript. You can edit the code in the code editor, and the changes will be automatically reflected in the browser.