Quick Start
Create a New Project
Section titled “Create a New Project”Using Create React App:
npx create-react-app my-appcd my-appnpm startUsing Vite (Recommended):
npm create vite@latest my-app -- --template reactcd my-appnpm installnpm run devProject Structure
Section titled “Project Structure”my-app/├── node_modules/ # Dependencies├── public/ # Static assets├── src/ # Source code│ ├── App.jsx # Root component│ ├── main.jsx # Entry file│ └── ...├── index.html # HTML template├── package.json # Project configuration└── vite.config.js # Vite configurationWrite Your First Component
Section titled “Write Your First Component”function App() { return ( <div> <h1>Hello, React!</h1> <p>Welcome to React development.</p> </div> );}
export default App;Start Development Server
Section titled “Start Development Server”npm run devOpen http://localhost:5173 to view your application.