React - link via button

0 votes
156 views
added Apr 21, 2021 in React by LC Marshal Captain (25,790 points)
<button
  type="button"
  onClick={(e) => {
    e.preventDefault();
    window.location.href='http://google.com';
    }}
> 
Call for price</button>

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...