title: Reactjs @setState with a dynamic key value
body: <p>I have a dynamic object in props, which I want to send in state</p>
  
  <pre><code>@setState
    key: val
    values:
      another_key: value
      @props.data.option: @props.data.value
  </code></pre>
  
  <p>But this way does not work, I found this solution:</p>
  
  <pre><code>  newState = {}
    newState[@props.data.option] = @props.data.value
    this.setState(newState);
  </code></pre>
  
  <p>But this way sets the value of the right in state</p>