DEV Community

Cover image for How to create new React-App?
Umar
Umar

Posted on

How to create new React-App?

Content

  • What is React-App?
  • What do we need to download to make the react-app work?
  • How to run React-App?

What is React-App?

React is a JavaScript library for creating user interfaces.React based on components.It doesn't hang even if you write code all day.It is convenient, fast and popular.The main advantage of this library is that it is assigned to a declarative approach.More informations about react you can find on React's official web-site

What to download to make the machine work?

Node JS

For working React we need asynchronous event-driven JavaScript which called Node JS. Node JS is not a programming language but rather an open-sourced runtime environment for JavaScript.For more information, you can visit official web-site of Node.js.You can also download it from there.

npm

npm is the world's largest Software Library, package manager and installer. npm is also the most convenient library without it the React will not work normally when we use DOM.We will install npm in terminal.

Opening terminal (shortcut)

on Windows -> Ctrl + Alt + W
on Linux -> Ctrl + Alt + T

After that, write thi code in your terminal to download npm

npm install -g npm
Enter fullscreen mode Exit fullscreen mode

Make sure that you installed npm with running code

npm --version
Enter fullscreen mode Exit fullscreen mode

Running React-App

Write this code to create new React-App

npx create-react-app (write name of your project)
Enter fullscreen mode Exit fullscreen mode

For instance:

npx create-react-app my-first-app
Enter fullscreen mode Exit fullscreen mode

Then write:

cd my-first-app
Enter fullscreen mode Exit fullscreen mode

Finally run:

npm start
Enter fullscreen mode Exit fullscreen mode


and you will see your first react-app (localhost:3000) with react dynamic icon like this

Image description

Cheers!

Top comments (0)