JSFiddle - React, Tailwind, and code Playground

HTML

<a href='#stuff'>stuff</a><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><a name='stuff'>stuff</a>

JavaScript

$('a[href="#stuff"]').click(function(e) {
    e.preventDefault(); //either this
    // do stuff here
    //return false; or this
});