title: React selecting option with object as attribute value
body: <p>I have an issue with react when I want to change the selected option.
  The problem is that the value is an object and I can't pass it in option value attribut.</p>
  
  <p>See the following code:</p>
  
  <pre><code>class Selector extends React.Component {
    contructor(props) {
      super(props)
      this.state = { obj: null }
      this.handleChange = this.handleChange.bind(this)
    }
  
    handleChange(e) {
      this.setState({obj: e.target.value})
    }
  
    render() {
      &lt;select onChange={handleChange}&gt;
       {this.props.listOption.map((option, index) =&gt; 
         &lt;option key={index} value={option.obj}&gt;
           {option.name}
         &lt;/option&gt;
       )}
      &lt;/select&gt;
    }
  }
  </code></pre>
  
  <p>and with</p>
  
  <pre><code>&lt;Selector option={[{name: "name", obj:{...}}, ...]}&gt;
  </code></pre>
  
  <p>I need to change the state of the component with the value of the selected option.
  What I get when the state change is <code>"object Object"</code>. I suppose this happens because react can't embed javascript object in attribut of final view. I am right?</p>
  
  <p>Moreover, I set <code>obj</code> in state as null in the constructor
  Is there a right way to do it?</p>