Creating my first react app

Funsho Fatoye
2 min readMay 11, 2021

--

According to the react doc, using the create react app command is the easiest and best way to create a single page application in react.

Using this method sets up my dev environment with the latest javascript features, providing a great dev experience overall. One needs to have Node version greater than 10.16 and npm version greater than 5.6 installed on their machine. Use this guide to download and install Node and npm.

Once Node and npm have been installed on my computer, I can then proceed to create my first react app(within my project folder) using the following command in my terminal or command line tool:

npx create-react-app my-app

create-react-app is the command that creates the app while my-app is the name of the app or project. The create-react-app command automatically creates a project folder named my-app as stated in the command.

And I get the ‘Happy hacking’ message meaning my app has been created successfully.

All I need to do now is enter into my-app folder using the command:

cd my-app

And then I run this command:

npm start

This automatically opens a server on my default browser showing the content of my new react app like this:

Notice the url: localhost:3000. I guess the create-react-app generates a local server address for your projects

Use this link to install react templates.

--

--

Funsho Fatoye
Funsho Fatoye

Written by Funsho Fatoye

Product Designer specialising in building digital products. Learning to build and scale stuffs efficiently.

No responses yet