✅ Step 1: Install Node.js & npm
React requires Node + npm.
open terminal in linux
enter the code :
sudo apt install nodejs
after installation complited and next enter the code:
sudo apt install npm
check version node -v and npm -v
✅ Step 2: Install React using Vite (Recommended – Fast & Modern)
- Install Vite tool
npm create vite@latest my-react-app
- When asked:
Select React
Select JavaScript
- Open the project
cd my-react-app
- Install dependencies
npm install
- Run the project
npm run dev
Now open the browser and go to:
http://localhost:5173
🎉 React app is running!
Top comments (0)