ReactJS

Yet Another Javascript Framework

 

created by Facebook/Instagram

 

 

Jitu Khubchandani

@kjitu9

1

ReactJS

 
  • M(V)C
  • Stable Version - 0.13.3
  • Just 128 KB
 

Old Ways

 
  • jQuery on Browser

  • Server Side - (PHP, Rails, Django) 

 

Single Page Apps

 

JSON on Serverside

(Angular, Backbone, Ember)

 

 

Key Features of ReactJS

 
  • Just UI

  • Virtual DOM

  • Components

  • One way Data flow

  • JSX

 

JUST UI

 
  • Just (V) in MVC
  • Reusable Components
 

Virtual DOM

 

Example

 
var HelloMessage = React.createClass({
  render: function() {
    return React.DOM.div(
            {className: 'mystyle'},                         
            'Hello ' + this.props.name 
             );
      }
});

React.renderComponent(HelloMessage({name:"Jitu"}), mountNode);
 

JSX

 
/** @jsx React.DOM */
var HelloMessage = React.createClass({
  render: function() {
    return <div>{'Hello ' + this.props.name}</div>;
  }
});

React.renderComponent(<HelloMessage name="Jitu" />, mountNode);

DEMO

 

ReactJS

By Jitu Khubchandani

ReactJS

  • 1,934