JSFiddle - React, Tailwind, and code Playground
HTML
<div class="first" onclick="funOne(event)">
<div class="second" onclick="funTwo(event)"></div>
</div>
CSS
.first{width:600px; height:600px; background:yellow}
.second{width:100px; height:100px; background:orange; position:relative; top:50%; left:50%; margin-left:-50px; margin-top:-50px}
JavaScript
function funOne(e)
{
e.stopPropagation();
alert('Outer Div')
}
function funTwo(e)
{
e.stopPropagation();
alert('Inner Div')
}