The other way to start a React project or to install a React project is that you use Vite, this will install the React within no time.
step 1 is to get into the folder you want to install the react project in and right-click on the mouse to open vs code if installed or you can even use the cmd (command prompt ) or shell to navigate around the folders in the system.
step 2 use the command given below to start the project make Shure you have a proper internet connection and also update your node in case an older version is being used in your system
>>> npm create vite@latest
3. step 3 now you press enter it will now ask you to name the project, you can provide the name there.
4 .step 4 Now select js for JavaScript, and press enter it will install the project.
5. step 5 now you need to change into or get into the directory using the command prompt or terminal in visual studio code and type the command given below, the below command will install the necessary node modules into your project.
>>> npm i
6. step 6 you need to get into your terminal or open the cmd in that folder and type the below command to start the project
npm run dev
the above command will spin up the project and you that will be hosted on a local port on your pc, then ctrl + click on the link in the terminal it will redirect you to the local host application that has been started on your machine in your browser
Comments