React application setup with webpack 4 and babel 7 | React setup from scratch | React setup tutorial

react-setup

Now a days React.js is very popular library for the front end developers. Today I'm going to discuss a very important topic to start the react.js development.

Just to start with React.js we should know how to setup react js application.

I'm assuming you have installed node.js and NPM in your system.

Actually there are 2 ways to setup the react.js application at your system.

  1. React.js provides you facility to create the react application through the CLI (command line interface). Let me tell you how ? You know you just need to run only 2 command and you are ready for development.

    You'll can install create-react-app globally to your system so that in future you will not need to install it again. What you will need is just type create-react-app your-app-name .Here my-app is your application name. You can change it whatever name you wanted to your application.
  2. You can setup the react application with your custom configuration with the help of webpack and babel. Without going more theoretical let me explain the steps to setup the react application using webpack and babel.


Let suppose I have a directory react-setup and I'm into this directory.

Create a file named as package.json and inside package.json I have added all the dependencies which I need to run a react application. I also have setup the script commands for running project in development and to create the production build.

Now go to project directory which is react-setup. And run the command

This will install all the dependencies inside node_modules folder. All the dependencies has been added in package.json ...  Read More

Share This: