React onClick and preventDefault() link refresh/redirect?
<p>I'm rendering a link with react:</p>

<pre><code>render: -&gt;
  `&lt;a className="upvotes" onClick={this.upvote}&gt;upvote&lt;/a&gt;`
</code></pre>

<p>Then, above I have the upvote function:</p>

<pre><code>upvote: -&gt;
  // do stuff (ajax)
</code></pre>

<p>Before link I had span in that place but I need to switch to link and here's the trouble - every time I click on <code>.upvotes</code> the page gets refreshed, what I've tried so far:</p>

<p><strong><em>event.preventDefault() - not working.</em></strong></p>

<pre><code>upvote: (e) -&gt;
  e.preventDefault()
  // do stuff (ajax)
</code></pre>

<p><strong><em>event.stopPropagation() - not working.</em></strong></p>

<pre><code>upvote: (e) -&gt;
  e.stopPropagation()
  // do stuff (ajax)
</code></pre>

<p><strong><em>return false - not working.</em></strong></p>

<pre><code>upvote: (e) -&gt;
  // do stuff (ajax)
  return false
</code></pre>

<p>I've also tried all of the above using jQuery in my index.html, but nothing seems to work. What should I do here and what I'm doing wrong? I've checked event.type and it's <code>click</code> so I guess I should be able to avoid redirect somehow?</p>

<p>Excuse me, I'm a rookie when it comes to React.</p>

<p>Thank you!</p>