Check out example codes for "stop anchor tag scroll to top of page". It will help you in understanding the concepts better.

Code Example 1

<a href="#!">Link</a>

Learn ReactJs, React Native from akashmittal.com