Check out example codes for "javascript onclick alert are you sure". It will help you in understanding the concepts better.

Code Example 1

<a href="#" onclick="return confirm('Continue?')">DISABLE</a>

Learn ReactJs, React Native from akashmittal.com