I want to capture the clicked checkbox and execute an event.
var TestApp = React.createClass({
handleChange: function(){
var handle = this.getDOMNodes(); //gets entire Div. I want just the selected checkbox
},
getInitialState: function(){
selected: ''
},
render: function(){
return(
<div>
<input type="checkbox" className="option1" onChange={this.handleChange}/> Option1<br />
<input type="checkbox" className="option2" onChange={this.handleChange}/>Option2<br />
<span>{this.props.selected}</span>
</div>
);
}
});
React.render(<TestApp />, document.body);