Setup
Step 1: Install Node.js
Download the latest LTS version of Node.js from the official website.
Once installed, open your terminal (macOS/Linux) or Command Prompt (Windows), and verify the installation with the following commands:
$ node --version
v22.14.0
$ npm --version
v11.3.0
Your versions might differ slightly — that’s perfectly fine!
Step 2: Create a New React App
Navigate to the folder where you’d like to create your project:
$ cd path/to/your/folder
Run the following command to create a new React project with TypeScript:
$ npx create-react-app my-app --template typescript <your-project-name>
This will take a few minutes to install dependencies. Once complete, navigate into your project folder:
$ cd <your-project-name>
To start the development server, run:
$ npm run start
Your React app should now be running on http://localhost:3000.
Last updated