Setup React.js Enviorment
Hello, this blog is about to create react environment in your PC/laptop. To setup react basic file structure, first you have to install node.js globally into your PC/laptop, here I attached download link for that. I preferred LTS version.
download node.js from here
after installation if you want to verify if it is successfully installed or not ? run this command in cmd [ node -v ]
this command tells you what version you have installed, after this make a new folder anywhere you want, open that folder and in the address bar write cmd and just press enter, through this your cmd opens at current directory.
Now, write a command in cmd [npx create-react-app my-app]*
- note my-app is your app name you can choose any name you want but, it should start from small letter, it will take some minutes depending on your Internet speed. Once it is done it will show something like that.
Congratulations …..! you have successfully installed basic file structure of React, now open the folder my-app where your all files exist.
Final step, How to run react app on you local host 3000, for this open cmd again from my-app folder and just write this command [npm start]
and your react app hosted to you local server.
hope this blog helps you…….Happy coding