React For Beginners by Wes Bos

https://reactforbeginners.com/

premium step-by-step training course to get you building real world React.js + Firebase apps and website components.

Wes Bos is a Full Stack Developer, Speaker and Teacher from Canada. He works as an independent web developer and teaches as a lead instructor with HackerYou and Ladies Learning Code. Wes has taught over 500 students in 200+ classes and spoken at dozens of conferences around the world.

ReactJS radio button

This entry is part 3 of 35 in the series React JS

http://jsbin.com/mozegodapa/edit?html,js,console,output

class App extends React.Component {

  setFruit(event) {
    console.log(event.target.value);
  }

  render() {
    return (
      <div onChange={this.setFruit.bind(this)}>
        <input type="radio" value="Apple" name="fruit"/> Apple
        <input type="radio" value="Orange" name="fruit"/> Orange
      </div>
     )
  }
}

ReactDOM.render(<App/>, document.getElementById('app'));