Here, we will have a brief introduction of react and how we can setup the environment to create a react application.
Introduction to React:
First we need to install Node.js . Here is the link using which you can download and install Node.js (nodejs.org)
Once Node.js is installed successfully, we can start creating react app using npx.
Download and install Visual Code Editor. It makes it very easy to develop react app using this editor.
Here is the link to download Visual Studio Code – Code Editing. Redefined
Open VS Code and open the folder in which you want to create the application. Open terminal using ‘ Ctrl + ` ‘ shortcut.
Enter the below code in terminal and it will create a new react app. Here “sampleapp” is the application name. We can change the name as per our project requirement.
npx create-react-app sampleapp
Once the above process it completed, the new react app is ready to run. Before that we need to select the application directory. Use the below command to select the directory
To run the app enter the below code in terminal
To check the currect react js version you can use the below command.
npm view react version