JSFiddle - React, Tailwind, and code Playground

by spicyj

HTML

<script src="http://fb.me/react-with-addons-0.8.0.js"></script>
<script src="http://fb.me/JSXTransformer-0.8.0.js"></script>
<script src="https://raw.github.com/paulmillr/console-polyfill/master/index.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 {value: ''};
    },

    handleFormChange: function(e) {
        console.log('form change start ' + e.target.value);
        //this.setState({value: e.target.value});
        console.log('form change end ' + e.target.value);
    },

    handleInputChange: function(e) {
        console.log('input change start ' + e.target.value);
        //this.setState({value: e.target.value});
        console.log('input change end ' + e.target.value);
    },

    render: function() {
        return <div onChange={this.handleFormChange}>
            hello, <input value={this.state.value} onChange={this.handleInputChange} />
        </div>;
    }
});
 
React.renderComponent(<Hello />, document.body);