Check out example codes for "close button on google map jump the page". It will help you in understanding the concepts better.

Code Example 1

#map-canvas {
  overflow-anchor:none;
}
<div id="map-canvas"></div>

Learn ReactJs, React Native from akashmittal.com