How to initialize react app

create-react-app

Table of contents

No heading

No headings in the article.

There are several ways to do this, but I'll show you the easier one.

First, open your favorite browser and nodejs.org and download the lts version of nodejs according to your os.

after downloading install it.

open the terminal to verify it's installed

node -v 
v18.13.0

If it is giving you any number starting with v you are suitable for the next step.

open your terminal and initialize this command.

npx create-react-app appname

It will take some time here you can give any name to your app. here I'm just taking it as appname . it'll take some time according to your internet connection.

it'll give you a prompt after completing it.

and then move to your app folder and type this command to see if your project is initialized or not.

npm start

it will start a development server on your computer and open in the browser with the default page of react template.

And Congratulation you've initialized your first react app.