JSFiddle - React, Tailwind, and code Playground
HTML
<script>
function checkfhName(){
//check your conditions
checkConditions = false; //returned false
if(checkConditions){
//do stuff
return true;
}
return false;
}
</script>
<div id="navigation1">
<ul>
<li>
<a href="#link_clicked" onClick='return checkfhName();'>Link</a>
</li>
</ul>
</div>