Goal of the article: Launch a simple React application after setting up the development environment.
Here are the essential tools:
- Visual Studio Code (VS Code): This is certainly not a requirement to create React applications, but it is a fairly easy-to-use editor and a lot of support for development, the use of vscode will make it work. The development becomes much more interesting.
- Git Bash: Git is a very popular tool used for managing source code, especially if you are working on a large development team. VS allows you to integrate the Git Bash terminal and this makes it very convenient to push your code to the Git repository. In addition, it allows you to use most standard UNIX commands with the Bash environment simulation.
- Node.js: JavaScript runtime environment. Facebook suggests using the latest version of NodeJS when creating ReactJS applications
- npm: Node package manager. This is used in conjunction with the Node so that we can easily share packaged code modules.
Download VS Code
You can download VS Code here
The job of downloading and installing is quite easy. Microsoft has done a great job of simplifying the installation process for this application.
Using Git Bash with VS Code
Download Git Bash here
When you click through the Git installer, I recommend that you use all the default installation settings unless you really know what you are doing.
Now we will add Git Bash as a terminal integrated inside VS Code.
- Open a new terminal in VS Code (Ctrl + Shift +
) or Termial -> New Terminal
- Select Git Bash
Check the Git version: Enter the following command to check
git --version
Install NodeJS
Download nodejs here
I chose the recommended option for most users and then used all the default settings in Node.js settings.
Check point: After installation is complete, enter your command line:
node -v && npm -v
And it will look like this (your version may be more recent than my version):
Use create-react-app and create the first React App
Enter the following command in the command line.
npx create-react-app hello-world
It will take a few minutes to create the project, then you can open it in VS Code by running the following command:
cd hello-world && code .
The above command executes two commands. We are changing the directory in your new React application and then opening it in VS Code.
Now, open a new terminal (Ctrl + Shift + ) and enter this command to start the Node server and run your application.
npm start
To check, open your browser and visit localhost:3000
summary
We have just installed the necessary tools for developing the React App
- VS Code
- Git Bash
- Nodejs
- npm
And your development environment is up and running!
Refer
https: //medium.com/better-programming/my-react-dev-environment-s …..