Episode 2 of 32

Creating a React Application

Set up a new React project using Create React App and explore the project structure.

The easiest way to start a React project is with Create React App.

Creating the Project

npx create-react-app my-blog
cd my-blog
npm start

Project Structure

  • public/ — Static files and index.html
  • src/ — Your React components and code
  • src/App.js — The root component
  • src/index.js — Entry point that renders App

How It Works

React injects your component tree into the <div id="root"> element in index.html. The dev server provides hot reloading — changes appear instantly.