JSFiddle - React, Tailwind, and code Playground

HTML

<label for='hi'></label>

JavaScript

$(document).ready(function() {
    this.id = 'hi'
    $("label[for='" + this.id + "']").text("the new text");
})