JSFiddle - React, Tailwind, and code Playground

HTML

<ul>
    <li><a href="#" data-value="Codes">Get codes</a></li>
    <li><a href="#" data-value="Product">Get products</a></li>
</ul>

JavaScript

$(function() {
    $('ul').on('click','a[data-value]',function(){
        
        //check the console
        console.log(this.getAttribute('data-value'));
        
        refreshGrid(this.getAttribute('data-value'));
        return false;
    });

});