JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<ul>
<li><a href="#">hello</a></li>
<li><a href="#">hello</a></li>
<li><a href="#">hi</a></li>
<li><a href="#">hmm</a></li>
</ul>
</div>
JavaScript
$( "li:contains('hi')" ).css( "pointer-events", "none" );