JSFiddle - React, Tailwind, and code Playground

by vjeux

HTML

<script src="http://fb.me/JSXTransformer-0.10.0.js"></script>
<script src="http://fb.me/react-with-addons-0.10.0.js"></script>
<script src="http://fb.me/react-js-fiddle-integration.js"></script>

JavaScript 1.7

/** @jsx React.DOM */

var Checkbox = React.createClass({
  
  componentDidMount: function() {
    this.componentDidUpdate();
  },

  componentDidUpdate: function() {
    this.getDOMNode().indeterminate = this.props.indeterminate;
  },

  render: function() {
    return this.transferPropsTo(<input />);
  }
});

var Hello = React.createClass({
    render: function() {
        return <Checkbox type="checkbox" indeterminate={true} />;
    }
});
 
React.renderComponent(<Hello name="World" />, document.body);