React isn't an MVC framework.
Expresses the logic of a computation without describing its control flow
Emphasizes the movement of data and models programs as a series of connections
Oriented around data flows and the propagation of change
Whenever an element's visible state is changed without altering the layout of the document
When the render engine calculates positions and geometries of elements in the document
React doesn't use templates
JSX is a JavaScript XML syntax transform
// COMPONENT CODE
/** @jsx React.DOM */ var HelloMessage = React.createClass({ render: function() { return <div>Hello {this.props.name}</div>; } });
// APPLICATION CODE
var el = document.querySelector('#output');
React.renderComponent(<HelloMessage name="Joe" />, el);
// COMPONENT CODE
var HelloMessage = React.createClass({ render: function() { return React.DOM.div({}, "Hello ", this.props.name); } });
// APPLICATION CODE var el = document.querySelector('#output');
React.renderComponent(HelloMessage({name: "Joe"}), el);
# COMPONENT CODE
{div} = React.DOM
HelloMessage = React.createClass render: -> div {}, "Hello ", this.props.name
# APPLICATION CODE
el = document.querySelector('#output');
React.renderComponent HelloMessage(name: "Joe"), el