React Setup

Setting up React

Open your terminal to create your application. Run this command to create a React application named my-react-app:

$ npx create-react-app@latest my-react-app

Creating in current directory

Open your terminal in the directory you would like to create your application. Run this command to create a React application:

$ npx create-react-app@latest .

In this case , every file will be placed in the current directory.

Tip : When choosing folder name, make sure there are no spaces or capital letters because of npm naming restrictions.

Development Server

Once base application is created, if folder specified you just have to enter the folder. You can use this command to enter:

$ cd my-react-app

Then just start up the application with this command:

$ npm start