title: How to keep only one radio button selected with React
body: <p>Im trying to learn React by doing a small application with it. My application has two radio buttons and I would like to keep always only one of them checked, but cannot seem to figure out how to uncheck the other button when I select the other one. Instead they both remain selected. Here is a jsfiddle for it:</p>
  
  <p><a href="https://jsfiddle.net/4us5us2o/" rel="noreferrer">https://jsfiddle.net/4us5us2o/</a></p>
  
  <p>And here is the code:</p>
  
  <pre><code>var MyRadioButton = React.createClass({
    handleChange: function () {
      this.props.onChange(this.props.myValue)
    },
    render: function () {
      return (
        &lt;input type="radio" onChange={this.handleChange}&gt;{this.props.myValue}&lt;/input&gt;
      )
    }
  });
  
  
  var MyApp = React.createClass({
    getInitialState: function () {
      return {
        selectedValue: ''
      }
    },
    changeValue: function (newValue) {
      this.setState({selectedValue: newValue })
    },
    render: function () {
      return (
        &lt;div&gt;
          &lt;MyRadioButton onChange={this.changeValue} myValue="A" /&gt;
          &lt;MyRadioButton onChange={this.changeValue} myValue="B" /&gt;&lt;br&gt;&lt;/br&gt;
        &lt;/div&gt;
      )
    }
  });
  </code></pre>