Create React App (create-react-app) npm command





Hey guys in this post, you will learn about creating new React project using create-react-app npm command.

Overview


create-react-app is a tool to create a react application with all the configuration and dependencies that required to up and run the application.

In order use create-react-app, you should be installed Node.js on your system

Using npm


Open the command prompt/terminal and enter the following command –

npx create-react-app my-first-app

Using Yarn


Open the command prompt/terminal and enter the following command –

yarn create-react-app my-first-app

where, my-first-app is the name of the application, npx is a package runner tool that comes with npm5.2+

my-first-app
├── README.md
├── node_modules
├── package.json
├── package-lock.json
├── .gitignore
├── public
│   ├── favicon.ico
│   ├── index.html
│   ├── logo192.png
│   ├── logo512.png
│   ├── manifest.json
│   └── robots.txt
└── src
    ├── App.css
    ├── App.js
    ├── App.test.js
    ├── index.css
    ├── index.js
    ├── logo.svg
    ├── reportWebVitals.js
    └── setupTests.js

That’s it for this post, if you like this post, please share this post with your friends and collogues and also share this on your social media profiles.



Bushan Sirgur

Hey guys, I am Bushan Sirgur from Banglore, India. Currently, I am working as an Associate project in an IT company.

Leave a Reply