Check out example codes for "js onclick redirect". It will help you in understanding the concepts better.
Code Example 1
<button onclick="location.href='www.yoursite.com'">Click Me</button>
Code Example 2
<button id="myButton" class="float-left submit-button" >Home</button>
<script type="text/javascript">
document.getElementById("myButton").onclick = function () {
location.href = "www.yoursite.com";
};
</script>
Code Example 3
// Simulate a mouse click:
window.location.href = "http://www.w3schools.com";
// Simulate an HTTP redirect:
window.location.replace("http://www.w3schools.com");
Learn ReactJs, React Native from akashmittal.com