React :
React is declarative , flexible JavaScript library that can be used to build user interface. It is open source, component based front end javaScript library and responsible for view layer of application.
It is also allow us to create reusable UI components & 'V' (View) of MVC framework. these components display the data as it change over the time fastly.
Note: It is not framework, just a library.
Environment Setup :
Download the nodejs library to the system and install with env path. so we can use command prompt with node library.
At the time of writing this tutorial, following are the versions available on different OS.
OS | Archive name |
---|---|
Windows | node-v6.3.1-x64.msi |
Linux | node-v6.3.1-linux-x86.tar.gz |
Mac | node-v6.3.1-darwin-x86.tar.gz |
SunOS | node-v6.3.1-sunos-x86.tar.gz |
Installation on UNIX/Linux/Mac OS X, and SunOS
Based on your OS architecture, download and extract the archive node-v6.3.1-osname.tar.gz into /tmp, and then finally move extracted files into /usr/local/nodejs directory. For example:
$ cd /tmp
$ wget http://nodejs.org/dist/v6.3.1/node-v6.3.1-linux-x64.tar.gz
$ tar xvfz node-v6.3.1-linux-x64.tar.gz
$ mkdir -p /usr/local/nodejs
$ mv node-v6.3.1-linux-x64/* /usr/local/nodejs
Add /usr/local/nodejs/bin to the PATH environment variable.
OS | Output |
---|---|
Linux | export PATH=$PATH:/usr/local/nodejs/bin |
Mac | export PATH=$PATH:/usr/local/nodejs/bin |
FreeBSD | export PATH=$PATH:/usr/local/nodejs/bin |
Installation on Windows
Use the MSI file and follow the prompts to install the Node.js. By default, the installer uses the Node.js distribution in C:\Program Files\nodejs. The installer should set the C:\Program Files\nodejs\bin directory in window's PATH environment variable. Restart any open command prompts for the change to take effect.
eg like that.
Path: C:\\Program Files\nodejs\node_modules\npm\bin