How to Create your first ReactJS app in ubuntu?

How to Create your first ReactJS app in ubuntu?

In this article, we will create a react app in ubuntu. To create react app, we need npm and nodeJs packages.

install_react.png As a React Beginner, I learned how to install ReactJS and create a react app. React is a javascript library for building user interfaces. It is an open-source library developed by Facebook.

Note: Use the Terminal to execute below commands.

So, let's get started:

Step: 1 Install npm package manager

npm is a package manager for nodejs. The below command will install the latest version of the npm package manager.

      sudo apt-get update
      sudo apt-get install npm

Step: 2 Check the version of npm

      npm --version

Step: 3 Check the version of nodejs

npm packages are already installed with nodejs. Just check the version of nodejs

      node --version

Step: 4 Create a react app

The following command will create a react app my-app. Wait for few minutes to install the required files.

      npx create-react-app my-app

Step: 5 Let's start to build the app

      cd my-app
      npm start

After running the above commands, the react app is created. React app is opened in Default browser.

Thank you for reading this article.