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 Hello = React.createClass({
getInitialState: function() {
return {value: 10};
},
handleChange: function(e) {
console.log('react change')
this.setState({value: e.target.value});
},
componentDidMount: function(){
var input = this.refs.input.getDOMNode()
input.addEventListener('input', function(){
console.log('input')
})
input.addEventListener('change', function(){
console.log('change')
})
},
render: function() {
return <div><input type="range" ref='input' onChange={this.handleChange} value={this.state.value} />{this.state.value}</div>;
}
});
React.render(<Hello name="World" />, document.body);