Setting Up a React Environment

Setting Up a React Environment

Amongst others, there is an easy way to set up an environment for ReactJS application development which I'll be sharing with you in this article.

This method shows how to use the Node Package Management (NPM) command with create-react-app.

Installing NodeJS

  • Go to nodejs.org
  • Click the first download button.

Nodeorg

Download and install. To check the version you just installed, run this command node -v and npm -v for node and npm respectively.

terminal

Creating a React App

Create your React app by running this command (in an opened folder).

npx create-react-app yourappname

It will take some time; ensure you have a steady internet connection.

Go to github.com/facebook/create-react-app for more guidelines. After you do this, run cd yourappname then npm start to run your node browser in chrome.

Remember to change your language mode to be able to write in React.

language mode

select language mode to react

I hope you found this piece useful.