How install react js project #790
-
Explian all necessary requirements and process |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
✅ Method 1: Using Create React App (CRA)
bash
npx create-react-app my-app
cd my-app npm start ✅ Method 2: Using Vite (Faster & More Modern)
npm create vite@latest my-vite-app Choose framework: React Choose variant: JavaScript or TypeScript
cd my-vite-app npm run dev my-app/ |
Beta Was this translation helpful? Give feedback.
✅ Method 1: Using Create React App (CRA)
This is the most beginner-friendly way.
Make sure Node.js is installed. Run:
bash
t
node -v
npm -v
If not installed, download from: https://nodejs.org
bash
npx create-react-app my-app
Replace my-app with your project name.
bash
cd my-app
4. Start the development server
bash
npm start
Your React app will open at http://localhost:3000/.
✅ Method 2: Using Vite (Faster & More Modern)
For more advanced or lightweight setups.
npm create vite@latest my-vite-app
Follow the prompts:
Choose framework: React
Choose variant: JavaScript or TypeScript