score:0

2021 update :

<div
    style={{
      width: 15,
      height: 15,
      background: "blue",
      cursor: "pointer",
    }}
    onclick={() => {
      window.open("http://google.com", "_blank");
    }}
  />

score:1

this worked for me :)

<a target="_blank" href="http://google.com"> <button id="bt" >click</button> </a>

score:4

you don't even need jquery nor react to do that. it's as simple as this:

var ex = document.getelementbyid('ex');
ex.onclick = function(){
  console.log('clicked');
}

var bt = document.getelementbyid('bt');
bt.onclick = function(){
  ex.click();
}
<button id="bt">click</button>
<a id="ex">triggerable link</a>

of course, in react you can store the ref of the components, bind to the event and then trigger the event like this:

onclick(){
    this.ex.click();
}
render(){
    return (
        <div>
          <button id="bt" onclick={this.onclick.bind(this)} ref={(ref)=>{this.bt = ref}}>click</button>
          <a id="ex" onclick={()=>console.log("clicked")} ref={(ref)=>{this.ex = ref}}>triggerable link</a>
        </div>
    )
}

edit: if you just want a button that behaves like a link, you can use this, or any of the solutions listed in this question:

onclick(){
    window.location.href="http://url.com";
}
render(){
    return (
        <button id="bt" onclick={this.onclick}>click</button>
    )
}

score:17

use react-router link,instead of anchor tag.

import react, { component } from 'react';
import {link} from 'react-router-dom'
 // reactclass --
    return (
      <div>
      <link to='https://react.semantic-ui.com/'>
      <button type="button" classname="btn btn-info">button</button>
      </link>
      </div>
    );
  // end--

score:36

like this:

<button
    type="button"
    onclick={(e) => {
      e.preventdefault();
      window.location.href='http://google.com';
      }}
> click here</button>

Related Query

More Query from same tag