03_Installing React and Creating a React App - Maniconserve/React-Wiki GitHub Wiki

Setting up React using Create React App

Step 1: Install Node.js

  • Download and install Node.js from official website
  • This also installs npm (Node Package Manager)

Step 2: Create React App

Open VS Code terminal and run:

npx create-react-app my-app

What is npx?

  • npx = Node Package Executor
  • It runs packages without installing them globally

Create app in current folder

npx create-react-app .

Important Notes

  • App name must not be:

    • react
    • Capital letters (use lowercase only)

Step 3: Run the App

npm start

👉 This will start the development server and open the app in browser


Summary

  • Install Node.js
  • Use npx create-react-app to create project
  • Use npm start to run the app