Check out example codes for "prevent from going to a function html click". It will help you in understanding the concepts better.

Code Example 1

$("#clickable a").click(function(e) {
   // Do something
   e.stopPropagation();
});

Learn ReactJs, React Native from akashmittal.com