Setting Up React for front end development

Reading Time: < 1 minute

React is an opensource library that was developed by facebook for front-end web development, also the react-native variant is use in developing cross platform mobile apps.

As a prequisite, nodejs has to be installed on your computer before installing react. I highly recommend one to install the stable version especially for production purposes and the bleeding version for testing purposes

Installing nodejs (stable version is 10 as of this writing)

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash –

sudo apt-get install -y nodejs

Installing React

The react team has made things a little bit easier to setup by running the command below in your terminal

npx create-react-app my-app

Where “my-app” can be anything you decide to name your app, also npx allows you not to install react globally

When the installation is done a dicrectory/folder called “my-app” will have been created

from the terminal use cd to change into that directory

cd my-app

while in that directory, run npm start to launch your app in your browser

Leave a Reply

Your email address will not be published. Required fields are marked *