title: React JS - accessing component property in an element attribute
body: <p>I have an element defined as class, and in the <code>render()</code> method I'm trying to give an element a custom attribute <code>data-activates</code> with an id. However, in the resulting html I just see the plaintext of the expression, either one of the following:</p>
  
  <p><code>data-activates="{this.state._id}"</code></p>
  
  <p><code>data-activates="${this.state._id}"</code></p>
  
  <p><code>data-activates="{id}"</code></p>
  
  <p><code>data-activates="${id}"</code></p>
  
  <p>The id is present in both <code>props</code> and <code>state</code>, and outside of the element both of them work correctly:</p>
  
  <p><code>&lt;a className="dropdown-button waves-effect" href="#!" data-activates="{id}"&gt;</code></p>
  
  <p><code>{ id }, {this.state._id}</code> &lt;- works here</p>
  
  <p><code>&lt;/a&gt;</code></p>
  
  <p>For some reason React doesn't resolve expressions within the attribute and I need that for the dropdown to work. What am I doing wrong?</p>
  
  <p>Bonus point for a better way to implement dropdown in React, if there is no way to make this code work.</p>