Check out example codes for "html onclick stop propagation". It will help you in understanding the concepts better.
Code Example 1
<span onclick="event.stopPropagation(); alert('you clicked inside the header');">something inside the header</span>
Code Example 2
// "event" is not universally supported, so instead grab the first
// argument passed through the onclick handler and call
// "stopPropagation()" on it
<div onclick="(arguments[0] ? arguments[0].stopPropagation() : false);">...</div>
Learn ReactJs, React Native from akashmittal.com