JSFiddle - React, Tailwind, and code Playground

by zpao

HTML

<script src="http://react.zpao.com/builds/master/latest/react.js"></script>
<script src="http://react.zpao.com/builds/master/latest/JSXTransformer.js"></script>
<script src="http://fb.me/react-js-fiddle-integration.js"></script>

JavaScript 1.7

/** @jsx React.DOM */

var Hello = React.createClass({
    getInitialState: function() { return {i: 0}; },
    click: function() { this.setState({i: this.state.i + 1}); },
    render: function() {
        return <div className={!!(this.state.i % 2)} onClick={this.click}>{this.state.i} Hello {Date.now()}</div>;
    }
});
 
React.renderComponent(<Hello name="World" />, document.body);