DEV Community

M.Ark
M.Ark

Posted on • Edited on

Introduction to React

*Digesting React
Learn how to build web applications with React. *

We will create our initial React project by using ‘ create-react-app ’ . ‘ create-react-app ’ (CRA) is the best way to start building a new React single page application. It sets up our development environment so that we can use the latest Javascript features and optimization for our app. It is a Command Line Interface tool that makes creating a new React project, adding files and other on-going development tasks like testing, bundling and deployment easier.
It uses build tools like Babel and Webpack under the hood and provides a pleasant developer experience for us that we don ’ t have to do any manual configurations for it.
To begin our journey with React. We have to setup our local computer environment.

  1. Have a Code editor
  2. Install Node.js
  3. Installing Create React App
  4. Installing React Developer Tools Among the reasons why React is liked by developers include;
  • Its Minimalist
  • It has a small learning curve
  • It’s unopinionated
  • Strong community support

In our terminal, we run npx create-react-app my-first-react-app
Note: The reason we are using npx is because create-react-app is a package expected to be run only once in our
project. So it is more convenient to run it only once rather than downloading it on to our machine and then use it.

Once it has finished executing, we have to run the following commands .
cd my-first-react-app - This we shall be going to our project folder. Once we inside our project folder, we run the next command.
npm start- This starts our newly React created application.
A browser window will open and you’ll be greeted with the index page of CRA apps.

Top comments (0)