JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://fb.me/react-with-addons-0.12.0.js"></script>
<script src="http://fb.me/JSXTransformer-0.12.0.js"></script>
<script src="http://fb.me/react-js-fiddle-integration.js"></script>
JavaScript 1.7
var Counter = React.createClass({
getInitialState: function() {
return {count: 0};
},
componentDidMount: function() {
setInterval(this.updateCount, 1000);
},
updateCount: function() {
var nextCount = this.state.count + 1;
this.setState({count: nextCount});
},
render: function() {
return <div>Seconds: {this.state.count}</div>;
}
});
React.render(<Counter />, document.body);