DEV Community

Emdadul Islam
Emdadul Islam

Posted on • Updated on

How to create a REACT app

To create a React application, you will need to have Node.js and npm (or yarn) installed on your computer. Once you have those tools, you can create a new React app by using the create-react-app command line utility. Here's an example:

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

This will create a new directory called my-app inside your current directory, and it will generate all the necessary files for a basic React app. Once the app is created, you can navigate to the app directory and start the development server by running the following commands:

cd my-app
npm start
Enter fullscreen mode Exit fullscreen mode

Alternatively, if you're using yarn, you can use the following commands:

cd my-app 
yarn start
Enter fullscreen mode Exit fullscreen mode

This will start the development server and open the React app in your default web browser. You can then start building your React app by editing the files in the src directory.

Top comments (0)