{"id":2830,"date":"2017-09-22T10:05:00","date_gmt":"2017-09-22T10:05:00","guid":{"rendered":"https:\/\/www.htmlgoodies.com\/uncategorized\/getting-started-with-reactjs\/"},"modified":"2017-09-22T10:05:00","modified_gmt":"2017-09-22T10:05:00","slug":"getting-started-with-reactjs","status":"publish","type":"post","link":"https:\/\/www.htmlgoodies.com\/html5\/getting-started-with-reactjs\/","title":{"rendered":"Getting Started with ReactJS"},"content":{"rendered":"
ReactJS is a popular JavaScript library that is declarative, flexible and efficient and is also easy to use. It was built by the Facebook and Instagram development teams and is used for creating reusable user interface components. The prerequisites for learning ReactJS are that one should have a good working knowledge of JavaScript, HTML5, and CSS. This article presents a discussion of what ReactJS is and how we can work with it. Note that we will be using the terms React and ReactJS interchangeably in this article — both imply the same thing.<\/p>\n
So, what is ReactJS? Is it another JavaScript framework much like AngularJS? Not exactly, since React is just the view layer unlike AngularJS which is a complete framework. So, you cannot build a complete dynamic application only using ReactJS. In other words, while Angular is a complete JavaScript framework for application development, React is just meant for interface development. Also note that while AngularJS doesn’t support the Node.js platform, you do use Node.js in the front-end when working with React.<\/p>\n
One of the best features of ReactJS is that it quickly leverages virtual DOM. Manipulation of DOM elements is quite an expensive operation. This is exactly where ReactJS comes to the rescue. Incidentally, virtual DOM is much faster than the regular DOM. Actually, React creates its own Virtual DOM environment where the components reside.<\/p>\n
Get ReactJS from GitHub<\/a>.<\/p>\n Here’s are some of the most striking features of ReactJS.<\/p>\n Before you start using React, you can use npm or Facebook CDN to install React in your system. In this section, we will build a simple program that uses ReactJS. Assuming that you have the necessary JavaScript files available to work with React, the following piece of code can be used to create a React component.<\/p>\n If you have a div element in your HTML page named “sample,” the following piece of code can be used to render the component we just created.<\/p>\n As we already have discussed earlier in this article, React is only the view — it is not a complete application development framework such as AngularJS. React doesn’t have support for promises, Ajax, event system (sans the vanilla DOM events), data layer, etc. In this article, we have discussed the ReactJS framework, its capabilities, a comparison between ReactJS and AngularJS frameworks and how we can get started using ReactJS. Stay tuned for more articles on ReactJS in my future posts here.<\/p>\n ReactJS is a popular JavaScript library that is declarative, flexible and efficient and is also easy to use. It was built by the Facebook and Instagram development teams and is used for creating reusable user interface components. The prerequisites for learning ReactJS are that one should have a good working knowledge of JavaScript, HTML5, and […]<\/p>\n","protected":false},"author":64,"featured_media":1540,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[30715,30618,30620],"tags":[3385,831,8813,30596,30597,9398,1283],"b2b_audience":[29,37],"b2b_industry":[],"b2b_product":[76,68,118,107,129,93,113,98],"acf":[],"yoast_head":"\nFeatures of ReactJS<\/h2>\n
\n
Getting Started – Building a Simple Program Using React<\/h2>\n
var Hello = React.createClass({\n render: function(){\n return (\n <div>This is a simple component built using React!<\/div>\n );\n }\n});<\/code><\/pre>\n
ReactDOM.render(<test><\/test>, document.getElementById('sample')); <\/code><\/pre>\n
Summary<\/h2>\n
Resources:<\/h3>\n
\n