Get Started with first React App

Web Development

Get Started with first React App

In this article, I will walk you through the steps to create your first react app. First of all, you need to check that you have Node and npm installed, you can check this by running these commands.

node -v

npm -v

check node

If you don't have a node installed, you can simply go to this link and install node. https://nodejs.org/

After you have installed node, run the commands above to make sure its working as expected. If you've previously installed create-react-app globally via npm install -g create-react-app, we recommend you uninstall the package using npm uninstall -g create-react-app or yarn global remove create-react-app to ensure that npx always uses the latest version. The most easist way to create a react app is to create app with npx Now run the following command to install npx.

npm i -g npx

In Linux or Mac OS, if you found any permission related errors use sudo before it.

sudo npm i -g npx

Finally run this command to create your react app.

npx create-react-app my-app

Now in order to run your app run these commands

cd decodeclub

npm start

Congratulations on creating your first React app!