React: Getting Element and apply onClick after render
<p>I am using react with a bootstrap theme which uses jquery.</p>

<p>The problem is that bootstraps dropdown menu and reacts onClick does not work together. </p>

<p>My solution is that i apply the onClick handler using jQuery in the componentDidUpdate() method of my component. This works as expected.</p>

<p>This does not work: </p>

<pre><code> &lt;ul className="dropdown-menu pull-right"&gt;
     &lt;li id="logout-button"&gt;
         &lt;a href="#" onClick={this.logout.bind(this)}&gt;&lt;i&gt;&lt;/i&gt; Logout&lt;/a&gt;
     &lt;/li&gt;
 &lt;/ul&gt;
</code></pre>

<p>This works:</p>

<pre><code>public componentDidUpdate() {
  // workaround: problems with bootstraps dropdown onclick event
  $('#logout-button').click(() =&gt; {
      this.logout();
      return false;
  });
}
</code></pre>

<p>But how can i do this in pure react?</p>

<p>How can i retrieve my dom element in react and apply a onClick listener after render ? </p>