Thursday, April 13, 2017

How to install React

Guide for react installation can be found at :

Steps involved
1) Create a project
npm init

2 ) Install React and React DOM
npm install --save react react-dom

3) Install Babel ( Enabling Es6 and JSX )
npm install --save-dev babel-cli babel-preset-react

 4) Babel preset 2015
npm install --save-dev babel-cli babel-preset-es2015

Enable babel
  "name": "reactprojects",
  "version": "1.0.0",
    //my babel config file

Install web pack
npm install --save-dev webpack

Create a React app.

  • We can download or clone the react-app using the following URL
  • Move to this folder in command prompt
  • Install all the necessary packages . Steps 1 to 4 described above
npm install -g create-react-app

create-react-app my-app
cd my-app/
npm start


No comments:

Post a Comment