JSFiddle - React, Tailwind, and code Playground

HTML

<a href="javascript;" onClick="if(confirm('Are you sure?'))
alert('You choose yes!');
else alert('You choose no!')">Click me</a>