JSFiddle - React, Tailwind, and code Playground

HTML

<input id='uid' type="text">

JavaScript

var sourceFN = function (request, response) {
    console.log($(this.element).prop("id"));
    response(['a', 'b', 'c']);
}
$("#uid").autocomplete({
    source: sourceFN
});