Check out example codes for "html disable anchor link". It will help you in understanding the concepts better.

Code Example 1

a.isDisabled {
  pointer-events: none;
}

Learn ReactJs, React Native from akashmittal.com