React

How to create a new React Application

first-react-app

If this is your first React application that you are building please follow the steps below

  1. Install Node and NPM. Please note that your node needs to be later than or equal to version 8.10. Since I do development on windows and need multiple node versions I installed https://github.com/coreybutler/nvm-windows . This utility lets me switch between varioud node versions on windows but you might not need this.
  2. Go to command line and run the following commands
npx create-react-app my-app
cd my-app
npm start

3. For those in doubt, npx is just a package manager which is supported from npm version 5.2+ onwards.

4. It will launch the application on your browser with URL http://localhost:3000/

5. Once you are done coding and need to deploy to production, run the following command.

npm run build

This will create production ready build for your application.

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

About anil

Hi, I'm Anil Verma. I have a passion for teaching and developing awesome front end apps. I was involved in development of post processor for Nastran(built by NASA). More recently I have been building supply chain apps at E2open.
View all posts by anil →

Leave a Reply

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