How to handle onClick code if user clicks "open link in new tab" in React js
<p>I want to run some tracking code when user clicks a button in my react project. However on click handler doesn't executed if user open it in a new tab.</p>

<p>Is there any solution for it in React js.</p>

<p>Simple example:</p>

<pre><code>var Hello = React.createClass({
    render: function() {
        function click(event) {
            event.preventDefault();
            console.log('You can see me even is user clicked on "open link in new tab"')
        }
        return &lt;div &gt;
            &lt; a href = '#'
        target = "_blank"
        onClick = { click } &gt; Go there &lt; /a&gt; &lt; /div&gt;;
    }
});

React.render( &lt; Hello / &gt; , document.body);
</code></pre>