Saturday, April 29, 2017

Step By Step Guide to Install and Create ReactJs Application in OSX

Hello,

Recently we have decided to use ReactJs for building mobile web applications and I faced some difficulties in setting up ReactJs in OSX so here in this blog I will explain step by step procedure from installation of ReactJS to creating and running application and Getting started with ReacJs in OSX

1) Install Xcode and Xcode command lines tools.



Get Xcode from Mac App Store. Click Here

2) Install Xcode Command Line Tools, Open terminal and run following command.

xcode-select --install

3) Install Homebrew, Homebrew is a package manager to install missing package on OSX. Open terminal and run following command.

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

4) Install NodeJs and NPM. React comes package in NPM so we have to install it. Run following command in terminal

brew install node

After installation check with following command to see if it's installed.

node -v

npm -v

5) Next we will install React, run following command in terminal.

npm install react

6) Now we will install Command line utility to create react app. Run following command in terminal.

npm install -g create-react-app

7) Create new react app. Run following commands in terminal.

create-react-app ReactApp
cd ReactApp
npm start

It should display following message in terminal.



And it will open ReactApp in your default browser.




That's it, Now you can work on ReactApp code and just refresh it in browser to see effect. Hope this helps you.






No comments:

Post a Comment