Create your first React application

React is a JavaScript library for creating interactive, stateful & reusable UI interfaces. It is developed by Facebook.

The library basically works on Virtual DOM. It keeps the DOM manipulation very less and increases the execution speed.

Creating a new react application is easy. There is a tool called create-react-app which is developed by Facebook team. It provides a basic skeleton application, and then you can customize it as per your requirements.

Install the create-react-app using npm manager,

Create React Application

Once it is installed, you can create your react application in just single command. Simply run the create-react-app and provide the name of your application.

This will create a directory named my-react-app and will install all the dependencies. It will set up a working environment for your new application. Once it completes the installation, you can simply run your new react application.

This will basically start the node server in development mode. You can view the application using http://localhost:3000/. You can see the errors and warnings (if any) on the page itself as this runs in development mode.

That is it. You can now edit the application and make the changes as per your requirement.

Production build

Once you are done with the development, you can build the production version of your application. It basically bundles all the required files and creates an optimized version for best performance.

This command will create a new directory called build. You can point your domain to build directory and you are good to go!