title: How to select only one checkbox in Reactjs
body: <p>I need to select only one checkbox with other being un-selected at a time in reactJS</p>
  
  <pre><code>createElement('div', {className: 'checkbox'},
    createElement('label', null,
      createElement('input', {
        type: 'checkbox',
        name: 'tssort',
        defaultChecked: !this.state.head,
        onChange: this.sorter
      }), 'Sort by action'),
      createElement('label', null,
        createElement('label', null,
          createElement('input', {
            type: 'checkbox',
            name: 'tssort',
            defaultChecked: this.state.head,
            onChange: this.sorter
          }),
       'Sort by Re-action')
      )
   ),
  </code></pre>
  
  <p>In the <code>this.sorter</code>, I'm using <code>this.setState</code> to set the values to the checkbox, I tried assigning the same name to both the checkbox and assign only one value at a time. But which is not fruitful at least from my end. Guide me how to sort it out.</p>